This commit is contained in:
John Cupitt 2014-10-16 11:22:03 +01:00
parent a8f4ed7871
commit 2acd185ee2
4 changed files with 17 additions and 29 deletions

11
TODO
View File

@ -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
- fix up aconv
- rewrite im_conv() etc. as vips_conv()
- 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

View File

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

View File

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

View File

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