diff --git a/TODO b/TODO index 474ae19d..f717cb21 100644 --- a/TODO +++ b/TODO @@ -3,6 +3,8 @@ - update examples with new image constant rules + update blog post with new examples/try12.py + - do more tests - put exif autorotate into jpeg load @@ -15,17 +17,12 @@ - vips_resize() should use vipsthumbnail's block/cache/affine/sharpen chain -- vips_object_unref_outputs() needs docs ... bindings will need it - -- rewrite im_conv() etc. as vips_conv() +- fix up aconv + +- rewrite im_conv() etc. as vips_conv(), also the mosaicing functions finally finish --disable-deprecated option -- vips_object_unref_outputs() needs docs ... bindings will need it - -- where should we explain VIPS_IMAGE_ADDR(), VIPS_REGION_ADDR(), - vips_region_region() etc.? - - check and fix up docs diff --git a/libvips/iofuncs/object.c b/libvips/iofuncs/object.c index 30664050..d012c0e5 100644 --- a/libvips/iofuncs/object.c +++ b/libvips/iofuncs/object.c @@ -2954,12 +2954,18 @@ vips_object_unref_outputs_sub( VipsObject *object, return( NULL ); } -/* Unref all assigned output objects. +/** + * vips_object_unref_outputs: + * @object: object to drop output refs from + * + * Unref all assigned output objects. Useful for language bindings. * * After an object is built, all output args are owned by the caller. If * something goes wrong before then, we have to unref the outputs that have - * been made so far. And this function can also be useful for callers when + * been made so far. This function can also be useful for callers when * they've finished processing outputs themselves. + * + * See also: vips_cache_operation_build(). */ void vips_object_unref_outputs( VipsObject *object ) diff --git a/python/example/try12.py b/python/example/try12.py index 363ddaf0..9f5c58f7 100755 --- a/python/example/try12.py +++ b/python/example/try12.py @@ -6,14 +6,12 @@ from gi.repository import Vips im = Vips.Image.new_from_file(sys.argv[1], access = Vips.Access.SEQUENTIAL) -black = Vips.Image.black(im.width, 150) -red = (black + [255, 0, 0]).cast(Vips.BandFormat.UCHAR) +footer = Vips.Image.black(im.width, 150) left_text = Vips.Image.text("left corner", dpi = 300) right_text = Vips.Image.text("right corner", dpi = 300) - -left = left_text.embed(50, 50, im.width, 150) -right = right_text.embed(im.width - right_text.width - 50, 50, im.width, 150) -footer = (left | right).ifthenelse(black, red, blend = True) +footer = footer.insert(left_text, 50, 50) +footer = footer.insert(right_text, im.width - right_text.width - 50, 50) +footer = footer.ifthenelse(0, [255, 0, 0], blend = True) im = im.insert(footer, 0, im.height, expand = True) diff --git a/python/test/test_overrides.py b/python/test/test_overrides.py deleted file mode 100644 index 55da3540..00000000 --- a/python/test/test_overrides.py +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/python - -import unittest -import math - -#import logging -#logging.basicConfig(level = logging.DEBUG) - -from gi.repository import Vips - -class TestOverrides(unittest.TestCase): - -