start using overrides in Python

This commit is contained in:
John Cupitt 2014-10-13 14:21:05 +01:00
parent 76a9e0d161
commit a0988ffc31
25 changed files with 474 additions and 63 deletions

17
TODO
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

429
python/log Normal file
View File

@ -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)

View File

Before

Width:  |  Height:  |  Size: 176 KiB

After

Width:  |  Height:  |  Size: 176 KiB

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -7,6 +7,5 @@ import math
#logging.basicConfig(level = logging.DEBUG)
from gi.repository import Vips
from vips8 import vips

View File

@ -7,7 +7,6 @@ import math
#logging.basicConfig(level = logging.DEBUG)
from gi.repository import Vips
from vips8 import vips
class TestOverrides(unittest.TestCase):

View File

@ -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)

View File

@ -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")

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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])

View File

@ -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])

View File

@ -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])

View File

@ -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])

View File

@ -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)

View File

@ -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")