Corruption when jpg cropping

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: XnTriq, helmut, xnview

Post Reply
DCT
Posts: 16
Joined: Wed Nov 18, 2009 8:24 am

Corruption when jpg cropping

Post by DCT »

The bug leads to irreversible data corruption.

The bug is occur from time to time when jpeg-cropping photos with have rotation tag (often 90 degrees).
When corruption occures, the final crop border position is seem to be rotated to originally selected.

How to reproduce the bug (not clear reproducible - try 10-20 times with different crop borders!): copy the attached image into a folder with other jpgs, open any other jpg, then scroll images to this image and jpg-crop (if open the attached image and crop it at once, there is no bug).
bug.jpg
DCT
Posts: 16
Joined: Wed Nov 18, 2009 8:24 am

Re: Corruption when jpg cropping

Post by DCT »

It looks quite close to these reported bugs (but these topics seems to describe more then one bug). The topic "Orientation tag and lossless jpeg crop" seems to be exactly the same bug (it is noted that there must be more than one jpg and to flip between them to reproduce).

I'm using XnView Classic 2.42, don't know how it works in MP. This bug certainly persist for many years (it trained me to use jpg-rotate first before crop to avoid data loss), but because of rare reproducibility and loosing of original image it is hard to make quite reproducible case report. I've reproduced this bug for the image attached for at least 4 times, so I'm hope it will be finally localised.

It seems that when flipping through images the cropping tool sometimes "forget" about existence of the orientation tag.
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Corruption when jpg cropping

Post by XnTriq »

Thank you for checking, DCT :-)

How to reproduce the bug in XnView v2.42:
  1. Open bug.jpg (courtesy of DCT).
  2. Go to ToolsJPEG Lossless transformationsRotate based on EXIF value and confirm with OK (“Do you want to continue?”).
  3. Go to EditSet Selection sizeCustom selection...:
    • X: [ 320 ]
    • Y: [ 320 ]
    • Width: [ 720 ]
    • Height: [ 1280 ]
  4. Go to ToolsJPEG Lossless transformationsCrop and confirm with OK (“Do you want to continue?”).
Result (1280×720)
Result (1280×720)
Expected result (720×1280)
Expected result (720×1280)
Cropped areas
Cropped areas
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Corruption when jpg cropping

Post by XnTriq »

Have you been able to reproduce this bug, Pierre? It should be the same in Classic and MP.
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Corruption when jpg cropping

Post by XnTriq »

XnTriq wrote:Have you been able to reproduce this bug, Pierre? It should be the same in Classic and MP.
:ba-rump-a-bump-bump:
User avatar
xnview
Author of XnView
Posts: 43326
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Corruption when jpg cropping

Post by xnview »

XnTriq wrote:Have you been able to reproduce this bug, Pierre? It should be the same in Classic and MP.
yes, the bug is present only in XnView Classic
Pierre.
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Corruption when jpg cropping

Post by XnTriq »

xnview wrote:
XnTriq wrote:Have you been able to reproduce this bug, Pierre? It should be the same in Classic and MP.
yes, the bug is present only in XnView Classic
OK, thanks for comfirming :-)
User avatar
XnTriq
Moderator & Librarian
Posts: 6336
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Corruption when jpg cropping

Post by XnTriq »

Seems to be fixed in v2.43 :bugfixed: Thank you for the fast response, Pierre!
Post Reply