Replies: 1 comment 1 reply
-
Hi @Nakilon, Yes, I would use The main docs warn against https://www.libvips.org/API/current/libvips-resample.html#vips-thumbnail-image Though maybe the ruby docs should have this warning too :( The dev checklist in the next version of the docs has some more info: https://github.com/libvips/libvips/blob/master/doc/Developer-checklist.md |
Beta Was this translation helpful? Give feedback.
-
The issue
I am comparing web page screenshots for testing purposes. The workflow is like this:
Image.new_from_buffer
The issue is that even after I renew the asset file it fails again (with the perceptual difference of 11), BUT if I save the current blob to another file and then load it back, the perceptual difference is zero!
Why? Because of some unexpected (for me and for practical reason, because it looks stupid to fix it via save/load) difference that exists between
Vips::Image#thumbnail_image
andVips::Image::thumbnail
here:The load-from-buffer feature was wanted by users two, times, and you would not notice the issue if all your fingerprinting was either from Image or from buffer, but in my workflow I need to compare practically the same blob loaded in both ways, and that's where the difference occures.
How to observe it?
vk_video.jpg.zip
Or use this debug script:
Expected behavior
The difference to be ≤5.
Screenshots
Environment:
I could rework the fingerprinting algorithm specifically for such case (the case of non-photorealistic images with huge blank lines) by calculating the "significance median" not two times (for vertical and horizontal half of fingerprinting) but once for both added, and maybe I will do it but not soon. I just think you might want to double-check if there is something unexpected happening in libvips.
Beta Was this translation helpful? Give feedback.
All reactions