Hi,

Thank you for your email. The last time I checked that worked. Maybe the pkg 
was not build with jpegqran support or some other API incompatibility?
Which distribution is that on? And self built or repository binary pkg?

Maybe you can point to a buggy line of code or send a patch - I would otherwise 
basically have take a look and debug that myself, …

        René

> On Jun 19, 2024, at 12:01, geisserml <[email protected]> wrote:
> 
> Hi exactimage community,
> 
> The description at [1] suggests to me exactimage should support lossless JPEG 
> cropping ("Lossless JPEG [...] ExactImage 0.4.1 further introduced: 
> cropping").
> Now, using econvert 1.0.2, it appears that cropping the attached sample is 
> actually lossy:
> > econvert -i Borstenhörnchen_060319_4.jpg --crop 0,0,800,800 -o 
> > cropped_groundsquirrel.jpg
> 
> When using PIL to diff output and original, we can see pixels differ:
> ```
> >>> import PIL
> >>> import PIL.ImageChops
> >>> a = 
> >>> PIL.Image.open("/home/me/Pictures/Wallpapers/Borstenhörnchen_060319_4.jpg")
> >>> b = 
> >>> PIL.Image.open("/home/mePictures/Wallpapers/cropped_groundsquirrel.jpg")
> >>> diff = PIL.ImageChops.difference(a, b)
> >>> diff
> <PIL.Image.Image image mode=RGB size=800x800 at 0x7F8BFFAB3C50>
> >>> diff.getbbox()
> (0, 0, 800, 800)
> >>> diff.show()
> >>> diff.save("/home/me/Pictures/Wallpapers/groundsquirrel_diff.png")
> ```
> 
> Also, when zooming close in a viewer, it gets evident the cropped part 
> differs from the original.
> 
> See the attached input, output, diff, and screenshots.
> Is this a bug, or am I perhaps using exactimage incorrectly?
> 
> Kind regards!
> 
> [1]: https://www.exactcode.com/opensource/exactimage/
> <cropped_groundsquirrel.jpg><Borstenhörnchen_060319_4.jpg><groundsquirrel_diff.png><Screenshot_20240619_115309.png><Screenshot_20240619_115232.png>-----------------------------------------------------------
>  
> If you wish to unsubscribe from this mailing, send mail to
> [email protected] with a subject of: unsubscribe exact-image

-- 
ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
http://exactcode.com | http://exactscan.com | http://ocrkit.com

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of: unsubscribe exact-image

Reply via email to