Page 1 of 1

Corruption when jpg cropping

Posted: Sat Sep 30, 2017 2:03 am
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

Re: Corruption when jpg cropping

Posted: Sat Sep 30, 2017 9:30 am
by XnTriq

Re: Corruption when jpg cropping

Posted: Sat Sep 30, 2017 1:07 pm
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.

Re: Corruption when jpg cropping

Posted: Sun Oct 01, 2017 4:00 pm
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

Re: Corruption when jpg cropping

Posted: Tue Oct 03, 2017 8:30 pm
by XnTriq
Have you been able to reproduce this bug, Pierre? It should be the same in Classic and MP.

Re: Corruption when jpg cropping

Posted: Tue Oct 10, 2017 7:30 pm
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:

Re: Corruption when jpg cropping

Posted: Thu Oct 12, 2017 12:58 pm
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

Re: Corruption when jpg cropping

Posted: Thu Oct 12, 2017 4:00 pm
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 :-)

Re: Corruption when jpg cropping

Posted: Sun Oct 22, 2017 8:30 am
by XnTriq
Seems to be fixed in v2.43 :bugfixed: Thank you for the fast response, Pierre!