Bug: "Keep original file when encoded result is larger" may delete your images permanently

Reported bugs that have been closed and/or resolved

Moderators: helmut, XnTriq, xnview, Dreamer

Litr
Posts: 67
Joined: Wed Oct 12, 2011 9:26 pm

Re: Bug: "Keep original file when encoded result is larger" may delete your images permanently

Post by Litr »

Also it looks like the feature does not work if you have filters enabled even if its just some very simple resize filter? Too bad. :|
snowfl
Posts: 6
Joined: Mon Jan 08, 2024 7:42 am

Re: Bug: "Keep original file when encoded result is larger" may delete your images permanently

Post by snowfl »

Litr wrote: Wed Jan 10, 2024 10:39 pm I think it has to do something if there is an image with attached color profile and "preserve color profile" feature is ENABLED. So maybe the "Keep original file when encoded result is larger" just does not work if "preserve color profile" in ENABLED?...
Just tried it and getting the same results

preserve extension ✅ + preserve color profile✅ = File size ratio: 202% and source file was deleted
preserve extension ❌+ preserve color profile ❌ = File size ratio: 202% and source file was deleted
preserve extension ✅ + preserve color profile ❌ = File size ratio: 202% and source file was deleted
preserve extension ❌ + preserve color profile ✅ = File size ratio: 202% and source file was deleted

Sample file on the first page if you like to test it.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Bug: "Keep original file when encoded result is larger" may delete your images permanently

Post by xnview »

Litr wrote: Wed Jan 10, 2024 10:45 pm Also it looks like the feature does not work if you have filters enabled even if its just some very simple resize filter? Too bad. :|
yes currently, i disable this option when there is actions. If you add actions, it's strange to keep original file...
Pierre.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Bug: "Keep original file when encoded result is larger" may delete your images permanently

Post by xnview »

Litr wrote: Wed Jan 10, 2024 10:39 pm So i tested it a bit more and it looks like the new feature SOMETIMES does not work if the extension is the same?
i.e. If i have JPGs then it will preserve new bigger files in one case... and wipe them out in other cases. :?
Please send me test files?
Pierre.
Litr
Posts: 67
Joined: Wed Oct 12, 2011 9:26 pm

Re: Bug: "Keep original file when encoded result is larger" may delete your images permanently

Post by Litr »

xnview wrote: Thu Jan 11, 2024 7:47 am
Litr wrote: Wed Jan 10, 2024 10:45 pm Also it looks like the feature does not work if you have filters enabled even if its just some very simple resize filter? Too bad. :|
yes currently, i disable this option when there is actions. If you add actions, it's strange to keep original file...
I agree if you use complex filters, but if you use resize then sometimes end results may be (way) bigger due to differently compressed/processed pixels despite smaller dimension. So it would be better to save original when that happens.

Perhaps you could add another checkbox like "Keep original file when encoded result is larger > Allow to use with active filters" and allow to save this checkbox state in the profile. :idea:
xnview wrote: Thu Jan 11, 2024 7:50 am
Litr wrote: Wed Jan 10, 2024 10:39 pm So i tested it a bit more and it looks like the new feature SOMETIMES does not work if the extension is the same?
i.e. If i have JPGs then it will preserve new bigger files in one case... and wipe them out in other cases. :?
Please send me test files?
Look in the attachments.
1) Conversion to JPEG format (see screenshot)
2) "Keep original file when encoded result is larger" is ON
3) Both of these files with color profiles so my yesterdays assumption that all color profiles are affected was incorrect, or maybe partially incorrect
4) Results:
color_profile_1.jpg will get BIGGER after conversion and will be saved
color_profile_2.jpg will get SMALLER after conversion and will be saved

Funny thing - if you forcefully convert these file once in XnView then they will both go down in size on the NEXT conversion. :D
Attachments
settings.png
color_profile_2.jpg
color_profile_2.jpg
color_profile_1.jpg
color_profile_1.jpg
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Bug: "Keep original file when encoded result is larger" may delete your images permanently

Post by xnview »

Please contact me by PM for a test version...
Pierre.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Bug: "Keep original file when encoded result is larger" may delete your images permanently

Post by xnview »

:bugconfirmed: Thanks to your detailed description I can reproduce the problem.
Pierre.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Bug: "Keep original file when encoded result is larger" may delete your images permanently

Post by xnview »

This problem is supposed to be fixed in XnView MP 1.6.5. Please check and confirm the bug fix here.
Pierre.
Litr
Posts: 67
Joined: Wed Oct 12, 2011 9:26 pm

Re: Bug: "Keep original file when encoded result is larger" may delete your images permanently

Post by Litr »

xnview wrote: Thu Feb 22, 2024 2:39 pm This problem is supposed to be fixed in XnView MP 1.6.5. Please check and confirm the bug fix here.
Everything is good on my side. Thank you! :bugfixed:
Litr
Posts: 67
Joined: Wed Oct 12, 2011 9:26 pm

Re: Bug: "Keep original file when encoded result is larger" may delete your images permanently

Post by Litr »

Would be nice if you update standalone XnConvert too...
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Bug: "Keep original file when encoded result is larger" may delete your images permanently

Post by xnview »

Litr wrote: Tue Feb 27, 2024 10:52 am Would be nice if you update standalone XnConvert too...
soon :)
Pierre.
Post Reply