Effect Corrupts Jpeg File

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

Moderators: helmut, XnTriq, xnview

Mixer
Banned
Posts: 166
Joined: Fri Aug 28, 2015 6:24 am

Re: Effect Corrupts Jpeg File

Post by Mixer »

xnview wrote:yes but now i need to be able to reproduce...
Does the word "R-r-r-r-respawn!" sound familiar to you?

You can get hexadecimal code in Preview in any Windows.
Get a fresh copy of XnView folder.
Drop there xnview.ini from the troubled user.
Copy file which you want to saturate into Xnview's folder too.
Create .lnk shortcut to xnview.exe in the same folder.
Right-click shortcut and add name of the file-to-be-saturated as command string parameter, so it looked like "DISK_LETTER:\Path_to_XnView\xnview.exe file_to_be_saturated.jpg". Photo of Capitol provided by XnTriq works well for that.
You almost done. Now start XnView from shortcut, but before applying filters to picture, go to tools->options->system integration and change storage folders for xnview.ini and database to XnView's directory.
Error repeating system is ready.
Next steps are like description of issue tells, Image->Adjust->Hue/Lightness/Saturation->drag saturation slider to some side, OK, doubleclick image to switch to Browser.
First thing you see after switching to Browser with doubleclick on filtered image is colorful thumbnail of file as it was before changing.
Hex is already in preview. Then thumbnail gets replaced with newer version. You can close XnView and start from shortcut again to saturate image in another direction. Hex is guaranteed.
But none of files get corrupted. If you click some other file in folder to refresh Preview window and then click resaturated file back it is displayed in Preview without problems.
And none of thumbnails get squished, not in Win7 x64, not in Win2k, not in Win10 x64, so maybe it is local problem of your Win 7.
Hakuna matata, have a happy bug hunting. When you're tired, delete whole XnView's folder.
Maybe XnView tries to access file and/or thumbnail before it gets written/created?
Last edited by Mixer on Thu Feb 25, 2016 4:40 pm, edited 1 time in total.
User avatar
Brother Gabriel-Marie
Posts: 286
Joined: Thu Aug 23, 2007 2:33 pm
Location: United States

Re: Effect Corrupts Jpeg File

Post by Brother Gabriel-Marie »

Sorry to put you all through a hard time here; I was just wanting to help make XnView perfect, that's all.

I have a workaround when XnView corrupts the file; I open it in Imagine and save it - this corrects the file and XnView can view it once more.

So I copied my xnview.ini to the xnview on my laptop (that way it will autosave, too) and it does not corrupt the file at all.
I have no ideas. Maybe it's just an issue with something on my desktop configuration.
And since noone can reproduce it, I guess there's no more reason to pursue it.
Thanks for your time, though, xntrick, Pierre.
Mixer
Banned
Posts: 166
Joined: Fri Aug 28, 2015 6:24 am

Re: Effect Corrupts Jpeg File

Post by Mixer »

Brother Gabriel-Marie wrote:I was just wanting to help make XnView perfect, that's all.
Perfect application for Windows can read any file which Windows can name.
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Effect Corrupts Jpeg File

Post by XnTriq »

Brother Gabriel-Marie wrote:Sorry to put you all through a hard time here; I was just wanting to help make XnView perfect, that's all.
There's absolutely nothing to feel sorry about! I'm actually grateful to everyone who takes the time to file a bug report – especially in cases involving potential file corruption. As a bonus, you helped me solve an old mystery :-)
I just wish we would've been able to reproduce the problem. Mixer's observations are almost identical to mine. The hex preview oddity seems to – at least in part – depend on whether or not XnView's browser is already running when the switch from viewer is initiated.
Brother Gabriel-Marie wrote:I have a workaround when XnView corrupts the file; I open it in Imagine and save it - this corrects the file and XnView can view it once more.
The downside to this method is that resaving JPEGs – even at a quality factor of 100 and without chroma-subsampling - will inevitably introduce generation loss.
Brother Gabriel-Marie wrote:So I copied my xnview.ini to the xnview on my laptop (that way it will autosave, too) and it does not corrupt the file at all.
I tend to go through the entire configuration from scratch whenever I install a new version of XnView, but of course that's too time consuming for most users.
Post Reply