Crash when saving converted B/W image

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

Moderators: helmut, XnTriq, xnview

Post Reply
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Crash when saving converted B/W image

Post by helmut »

XnView crashes when saving a JPG file which has been converted to Black/White.

To reproduce:

1.) Open a JPG file.
2.) Convert the JPG file to B/W using Image > Convert to binary > Binary (No dither)
3.) Save the image as JPG file.
-> XnView crashes :bug:

Note: This bug has been reported by Michael S.
ckit
XnThusiast
Posts: 2583
Joined: Tue Feb 17, 2004 1:11 am
Location: QLD, Australia
Contact:

Post by ckit »

I cannot reproduce this bug, for XnView ver check sig.
AMD Ryzen 3 3300X 3.8Ghz, 16Gb DDR4, RX6600XT with Dell U2520D at 2560x1440@60Hz scaling 125%
Win11 x64 24H2, Hard Disk Sentinel Pro, MS PowerToys, Process Lasso Pro and Wintoys
User avatar
Clo
XnThusiast
Posts: 4441
Joined: Sun Oct 17, 2004 4:57 am
Location: Bordeaux, France
Contact:

No crash here

Post by Clo »

—> ckit

:) Kello Chris !

• Same here, I can't get the bug, despite I followed the helmut's steps strictly…

- I get the B&W-JPEG (ugly, though…)

XnV 1.91 - XP-Pro SP1 FR.

:mrgreen: KR
Claude
Clo
Old user ON SELECTIVE STRIKE till further notice
User avatar
xnview
Author of XnView
Posts: 46255
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Crash when saving converted B/W image

Post by xnview »

Can't reproduce it too...
Pierre.
User avatar
Drahken
Posts: 884
Joined: Sun Apr 10, 2005 4:29 pm

Post by Drahken »

I can reproduce the bug on some images, but not others. I thought size was the issue at first, but it doesn't seem to be.
From the error message: modver 1.91.0.0 offset:00214ff7

This file contains 2 images and a text file. The gaijin images is NOT affected by the bug, the acvr image DOES cause xnview to crash when converted to b/w and saved. The text file is the full error report (far too long to post directly in a thread). http://cypherswipe.googlepages.com/BWbugtest.rar

Another thing to note: This bug only occurs when using save as, not when using the export function.

Edit: Been poking around with it a bit more, it's purely related to saving a bitonal format image as jpg. It doesn't matter whether you choose no dither, halftone, pattern, whatever, it'll still crash. However, if you covert it to b/w, then convert it to either greyscale or truecolor before saving, it does not crash.

I also uncovered another bug in the process. Convert the pic to binary, then convert it straight to 32bit. It vanishes. It still indicates that you have an image the original dimensions, but it's like it's all transparent. Strangely though, if you convert to binary, then truecolor, THEN 32 bit, it's fine.
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut »

Drahken wrote:I can reproduce the bug on some images, but not others. I thought size was the issue at first, but it doesn't seem to be.
From the error message: modver 1.91.0.0 offset:00214ff7 ...
Thank you, Drahken, for reproducing the bug and investigating this further. I hope that Pierre also can reproduce the bug (and then fix it).
User avatar
Drahken
Posts: 884
Joined: Sun Apr 10, 2005 4:29 pm

Post by Drahken »

Been playing around with this some more and discovered some interesting things:
1) It seems to be related to the original size of the jpg that you opened. If you open a large jpg, resize it by 50%, make it binary, then save as jpg, it crashes. However, if you open that same original image, resize it by 50%, save it, open the half sized image you just created, make it binary, save it as jpg, it does NOT crash. Extremely strange behavior.
2) This whole thing only works on the original jpg. If you open the original jpg in one tab, copy it, then paste it into a new tab, make binary & save, there is no crash. If you open the original jpg, save it as png (and presumably other formats, but I only tried png), then open the png, make it binary & save as jpg, there is no crash.
3) It doesn't matter what color format the original jpg is in. You can take the original (color) jpg, save it as greyscale, open the greyscale jpg, ->binary->save->crash. You can open the original (color) jpg, make it binary, export (only way to save the binary jpg without crashing), open that jpeg you just created (that's already black & white), set it to binary, save, crash.
Post Reply