diff --git a/TODO b/TODO index 66244213..588c642a 100644 --- a/TODO +++ b/TODO @@ -1,25 +1,12 @@ -- im_greyc_mask compat is not working? - - vips im_greyc_mask k2.jpg x.jpg k4.jpg 1 100 0.5 0.5 0.5 0.5 0.5 0.5 1 - 1 1 - - vips_gmic_gen is never called - - python: - - could import like this: - - from gi.repository import Vips - import vips_additions - - ie. make it a module, not a package, and make it clear that it - modifies Vips rather than adding anything itself - - should be a separate package? pyvips? easier to get into CPAN or whatever the python thing is called + - do more tests + - put exif autorotate into jpeg load see diff --git a/python/README.txt b/python/README.txt index 01bfa536..7c9e1a1e 100644 --- a/python/README.txt +++ b/python/README.txt @@ -5,3 +5,7 @@ binding for libvips. This is the vips8 API, so it's not yet fully implemented. Use the older vipsCC binding if you want a more complete system. + +To install, try: + +sudo cp Vips.py /usr/lib/python2.7/dist-packages/gi/overrides diff --git a/python/vips8/vips.py b/python/Vips.py similarity index 94% rename from python/vips8/vips.py rename to python/Vips.py index f193e1cc..701952c9 100644 --- a/python/vips8/vips.py +++ b/python/Vips.py @@ -1,14 +1,36 @@ -#!/usr/bin/python +# -*- Mode: Python; py-indent-offset: 4 -*- +# vim: tabstop=4 shiftwidth=4 expandtab + +# copy this file to /usr/lib/python2.7/dist-packages/gi/overrides/ + +# This file is part of VIPS. +# +# VIPS is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for +# more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk import sys import re - import logging -# you might need this in your .bashrc -# export GI_TYPELIB_PATH=$VIPSHOME/lib/girepository-1.0 +from gi import _gobject +from gi.repository import GObject +from ..importer import modules -from gi.repository import GLib, GObject, Vips +Vips = modules['Vips']._introspection_module +__all__ = [] # start up vips! Vips.init(sys.argv[0]) @@ -60,6 +82,8 @@ class Error(Exception): def __str__(self): return '%s\n %s' % (self.message, self.detail) +Vips.Error = Error + class Argument: def __init__(self, op, prop): self.op = op; @@ -102,6 +126,8 @@ class Argument: return value +Vips.Argument = Argument + def _call_base(name, required, optional, self = None, option_string = None): logging.debug('_call_base name=%s, required=%s optional=%s' % (name, required, optional)) @@ -227,6 +253,8 @@ def _call_base(name, required, optional, self = None, option_string = None): def call(name, *args, **kwargs): return _call_base(name, args, kwargs) +Vips.call = call + # here from getattr ... try to run the attr as a method def _call_instance(self, name, args, kwargs): return _call_base(name, args, kwargs, self) @@ -242,6 +270,8 @@ def vips_image_new_from_file(cls, vips_filename, **kwargs): return _call_base(loader, [filename], kwargs, None, option_string) +setattr(Vips.Image, 'new_from_file', classmethod(vips_image_new_from_file)) + # this is a class method def vips_image_new_from_buffer(cls, data, option_string, **kwargs): loader = Vips.Foreign.find_load_buffer(data) @@ -249,6 +279,8 @@ def vips_image_new_from_buffer(cls, data, option_string, **kwargs): raise Error('No known loader for buffer.') logging.debug('Image.new_from_buffer: loader = %s' % loader) +setattr(Vips.Image, 'new_from_buffer', classmethod(vips_image_new_from_buffer)) + # this is a class method def vips_image_new_from_array(cls, array, scale = 1, offset = 0): # we accept a 1D array and assume height == 1, or a 2D array and check all @@ -276,6 +308,8 @@ def vips_image_new_from_array(cls, array, scale = 1, offset = 0): return image +setattr(Vips.Image, 'new_from_array', classmethod(vips_image_new_from_array)) + def vips_image_getattr(self, name): logging.debug('Image.__getattr__ %s' % name) @@ -546,13 +580,6 @@ def vips_exp10(self): def vips_bandjoin2(self, other): return Vips.Image.bandjoin([self, other]) -# paste our methods into Vips.Image - -# class methods -setattr(Vips.Image, 'new_from_file', classmethod(vips_image_new_from_file)) -setattr(Vips.Image, 'new_from_buffer', classmethod(vips_image_new_from_buffer)) -setattr(Vips.Image, 'new_from_array', classmethod(vips_image_new_from_array)) - # Search for all VipsOperation which don't have an input image object ... these # become class methods @@ -663,8 +690,3 @@ Vips.Image.__ne__ = vips_notequal # the cast operators int(), long() and float() must return numeric types, so we # can't define them for images -# Add other classes to Vips -Vips.Error = Error -Vips.Argument = Argument -Vips.call = call - diff --git a/python/im.sh b/python/im.sh deleted file mode 100755 index 774aca7c..00000000 --- a/python/im.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -convert $1 \ - -background Red -density 300 \ - -font /usr/share/fonts/truetype/msttcorefonts/Arial.ttf \ - -pointsize 12 -gravity south -splice 0x150 \ - -gravity southwest -annotate +50+50 "left corner" \ - -gravity southeast -annotate +50+50 'right corner' \ - +repage \ - $2 diff --git a/python/log b/python/log new file mode 100644 index 00000000..c392ded8 --- /dev/null +++ b/python/log @@ -0,0 +1,429 @@ +EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE +====================================================================== +ERROR: test_abs (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_acos (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_add (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_and (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_asin (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_atan (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_avg (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_ceil (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_conjugate (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_cos (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_deviate (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_div (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_equal (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_exp (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_exp10 (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_floor (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_floordiv (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_histfind (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_histfind_indexed (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_histfind_ndim (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_hough_circle (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_hough_line (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_invert (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_less (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_lesseq (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_log (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_log10 (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_lshift (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_max (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_measure (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_min (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_mod (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_more (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_moreeq (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_mul (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_neg (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_noteq (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_or (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_polar (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_pos (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_pow (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_profile (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_project (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_rect (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_rint (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_rshift (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_sign (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_sin (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_stats (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_sub (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_sum (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_tan (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +====================================================================== +ERROR: test_xor (__main__.TestArithmetic) +---------------------------------------------------------------------- +Traceback (most recent call last): + File "./test_arithmetic.py", line 110, in setUp + im = Vips.Image.mask_ideal(100, 100, 0.5, reject = True, optical = True) +AttributeError: type object 'Image' has no attribute 'mask_ideal' + +---------------------------------------------------------------------- +Ran 53 tests in 0.010s + +FAILED (errors=53) diff --git a/python/images/IMG_4618.jpg b/python/test/images/IMG_4618.jpg similarity index 100% rename from python/images/IMG_4618.jpg rename to python/test/images/IMG_4618.jpg diff --git a/python/images/sRGB.icm b/python/test/images/sRGB.icm similarity index 100% rename from python/images/sRGB.icm rename to python/test/images/sRGB.icm diff --git a/python/test_all.py b/python/test/test_all.py similarity index 100% rename from python/test_all.py rename to python/test/test_all.py diff --git a/python/test_arithmetic.py b/python/test/test_arithmetic.py similarity index 99% rename from python/test_arithmetic.py rename to python/test/test_arithmetic.py index 3ba8a66f..0002e6b7 100755 --- a/python/test_arithmetic.py +++ b/python/test/test_arithmetic.py @@ -7,7 +7,6 @@ import math #logging.basicConfig(level = logging.DEBUG) from gi.repository import Vips -from vips8 import vips unsigned_formats = [Vips.BandFormat.UCHAR, Vips.BandFormat.USHORT, diff --git a/python/test_colour.py b/python/test/test_colour.py similarity index 99% rename from python/test_colour.py rename to python/test/test_colour.py index eefb2804..f314b6cc 100755 --- a/python/test_colour.py +++ b/python/test/test_colour.py @@ -7,7 +7,6 @@ import math #logging.basicConfig(level = logging.DEBUG) from gi.repository import Vips -from vips8 import vips unsigned_formats = [Vips.BandFormat.UCHAR, Vips.BandFormat.USHORT, diff --git a/python/test_conversion.py b/python/test/test_conversion.py similarity index 99% rename from python/test_conversion.py rename to python/test/test_conversion.py index 9cfaf32c..a45491c5 100755 --- a/python/test_conversion.py +++ b/python/test/test_conversion.py @@ -7,7 +7,6 @@ import math #logging.basicConfig(level = logging.DEBUG) from gi.repository import Vips -from vips8 import vips unsigned_formats = [Vips.BandFormat.UCHAR, Vips.BandFormat.USHORT, diff --git a/python/test_convolution.py b/python/test/test_convolution.py similarity index 86% rename from python/test_convolution.py rename to python/test/test_convolution.py index f8323f48..36386a2d 100644 --- a/python/test_convolution.py +++ b/python/test/test_convolution.py @@ -7,6 +7,5 @@ import math #logging.basicConfig(level = logging.DEBUG) from gi.repository import Vips -from vips8 import vips diff --git a/python/test_overrides.py b/python/test/test_overrides.py similarity index 88% rename from python/test_overrides.py rename to python/test/test_overrides.py index 619744e6..55da3540 100644 --- a/python/test_overrides.py +++ b/python/test/test_overrides.py @@ -7,7 +7,6 @@ import math #logging.basicConfig(level = logging.DEBUG) from gi.repository import Vips -from vips8 import vips class TestOverrides(unittest.TestCase): diff --git a/python/try10.py b/python/try10.py index 2f4c1ebf..28860e6a 100755 --- a/python/try10.py +++ b/python/try10.py @@ -7,8 +7,6 @@ logging.basicConfig(level = logging.DEBUG) from gi.repository import Vips -from vips8 import vips - a = Vips.Image.black(100, 100) a.draw_circle(128, 50, 50, 20) diff --git a/python/try11.py b/python/try11.py index ce71829a..721b78dd 100755 --- a/python/try11.py +++ b/python/try11.py @@ -7,8 +7,6 @@ import sys from gi.repository import Vips -from vips8 import vips - a = Vips.Image.new_from_file(sys.argv[1]) ipct = a.get("ipct-data") diff --git a/python/try12.py b/python/try12.py index a49fc120..363ddaf0 100755 --- a/python/try12.py +++ b/python/try12.py @@ -3,7 +3,6 @@ import sys from gi.repository import Vips -from vips8 import vips im = Vips.Image.new_from_file(sys.argv[1], access = Vips.Access.SEQUENTIAL) diff --git a/python/try2.py b/python/try2.py index 56982ee2..0c9f8272 100755 --- a/python/try2.py +++ b/python/try2.py @@ -3,8 +3,6 @@ import logging logging.basicConfig(level = logging.DEBUG) -from vips8 import vips - from gi.repository import Vips Vips.cache_set_trace(True) diff --git a/python/try3.py b/python/try3.py index dbc13ca6..2f944f2b 100755 --- a/python/try3.py +++ b/python/try3.py @@ -5,8 +5,6 @@ import sys #import logging #logging.basicConfig(level = logging.DEBUG) -from vips8 import vips - from gi.repository import Vips Vips.cache_set_trace(True) diff --git a/python/try4.py b/python/try4.py index 5b135d4c..5a1c7105 100755 --- a/python/try4.py +++ b/python/try4.py @@ -6,7 +6,6 @@ import sys #logging.basicConfig(level = logging.DEBUG) from gi.repository import Vips -from vips8 import vips a = Vips.Image.new_from_file(sys.argv[1]) diff --git a/python/try5.py b/python/try5.py index a17706cf..bc535fac 100755 --- a/python/try5.py +++ b/python/try5.py @@ -6,7 +6,6 @@ import sys #logging.basicConfig(level = logging.DEBUG) from gi.repository import Vips -from vips8 import vips a = Vips.Image.new_from_file(sys.argv[1]) diff --git a/python/try6.py b/python/try6.py index 53d30040..d0884915 100755 --- a/python/try6.py +++ b/python/try6.py @@ -6,7 +6,6 @@ import sys #logging.basicConfig(level = logging.DEBUG) from gi.repository import Vips -from vips8 import vips a = Vips.Image.new_from_file(sys.argv[1]) diff --git a/python/try7.py b/python/try7.py index e0ea2e6e..0971e3b8 100755 --- a/python/try7.py +++ b/python/try7.py @@ -6,7 +6,6 @@ import sys #logging.basicConfig(level = logging.DEBUG) from gi.repository import Vips -from vips8 import vips a = Vips.Image.new_from_file(sys.argv[1]) diff --git a/python/try8.py b/python/try8.py index 42ff7309..90ccb72c 100755 --- a/python/try8.py +++ b/python/try8.py @@ -6,7 +6,6 @@ import sys #logging.basicConfig(level = logging.DEBUG) from gi.repository import Vips -from vips8 import vips a = Vips.Image.new_from_array([[1, 2, 3], [4, 5, 6], [7, 8, 9]], 8, 128) diff --git a/python/try9.py b/python/try9.py index eaf778ff..969a388b 100755 --- a/python/try9.py +++ b/python/try9.py @@ -7,8 +7,6 @@ logging.basicConfig(level = logging.DEBUG) from gi.repository import Vips -from vips8 import vips - a = Vips.Image.black(100, 100) a.write_to_file("x.v") diff --git a/python/vips8/__init__.py b/python/vips8/__init__.py deleted file mode 100644 index e69de29b..00000000