oop, cache fix
This commit is contained in:
parent
57196ee702
commit
93ab9fd661
@ -414,10 +414,10 @@ vips_object_equal_arg( VipsObject *object,
|
|||||||
*/
|
*/
|
||||||
if( !(argument_class->flags & VIPS_ARGUMENT_REQUIRED) &&
|
if( !(argument_class->flags & VIPS_ARGUMENT_REQUIRED) &&
|
||||||
!vips_object_argument_isset( other, name ) )
|
!vips_object_argument_isset( other, name ) )
|
||||||
/* Optional and was not set on other ... can't be
|
/* Optional and was not set on other ... we've found a
|
||||||
* equal.
|
* difference!
|
||||||
*/
|
*/
|
||||||
return( NULL );
|
return( object );
|
||||||
|
|
||||||
g_value_init( &v1, type );
|
g_value_init( &v1, type );
|
||||||
g_value_init( &v2, type );
|
g_value_init( &v2, type );
|
||||||
|
@ -62,16 +62,17 @@ class TestResample(unittest.TestCase):
|
|||||||
im = Vips.Image.new_from_file("images/IMG_4618.jpg")
|
im = Vips.Image.new_from_file("images/IMG_4618.jpg")
|
||||||
im2 = im.similarity(angle = 90)
|
im2 = im.similarity(angle = 90)
|
||||||
im3 = im.affine([0, -1, 1, 0])
|
im3 = im.affine([0, -1, 1, 0])
|
||||||
|
# rounding in calculating the affine transform from the angle stops this
|
||||||
|
# being exactly true
|
||||||
|
self.assertTrue((im2 - im3).abs().max() < 50)
|
||||||
|
|
||||||
|
def test_similarity_scale(self):
|
||||||
|
im = Vips.Image.new_from_file("images/IMG_4618.jpg")
|
||||||
|
im2 = im.similarity(scale = 2)
|
||||||
|
im3 = im.affine([2, 0, 0, 2])
|
||||||
im2.write_to_file("im2.v")
|
im2.write_to_file("im2.v")
|
||||||
im3.write_to_file("im3.v")
|
im3.write_to_file("im3.v")
|
||||||
self.assertEqual((im2 - im3).abs().max(), 0)
|
self.assertEqual((im2 - im3).abs().max(), 0)
|
||||||
|
|
||||||
#im = Vips.Image.new_from_file("images/IMG_4618.jpg")
|
|
||||||
#im2 = im.similarity(scale = 2)
|
|
||||||
#im3 = im.affine([2, 0, 0, 2])
|
|
||||||
#im2.write_to_file("im2.v")
|
|
||||||
#im3.write_to_file("im3.v")
|
|
||||||
#self.assertEqual((im2 - im3).abs().max(), 0)
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
Loading…
Reference in New Issue
Block a user