d2phap / ImageGlass

🏞 A lightweight, versatile image viewer
https://imageglass.org
Other
7.45k stars 485 forks source link

Image corruption after editing/cropping an image #1134

Closed banshee24 closed 2 years ago

banshee24 commented 3 years ago

System information:

Actual behavior:

after editing/cropping an image, thumbnail picture of the image is not refreshed

Expected behavior:

new thumbnail image should be refreshed as edited image

Screenshots:

https://pasteboard.co/Kjk2P6O.png https://pasteboard.co/Kjk3aVJ.png

fire-eggs commented 3 years ago

Probable duplicate of #1059 or #754

Please let us know if the "Preserve Modify Date on Save" setting is enabled.

banshee24 commented 2 years ago

Hello,

"Preserve Modify Date on Save" setting is enabled and I still have the same problem. I hope that problem will be solved at upcoming versions.

Kind regards

B. Göktürk Bindal

Pilot CPL(A), FI(A) B.Sc. Mech. Eng.

fire-eggs commented 2 years ago

Enabling the "Preserve Modify Date on Save" is what is causing the problem. Windows Explorer will only update the thumbnail when the modify date is changed.

[Modified your reply to remove your phone #]

banshee24 commented 2 years ago

I disabled that option now but when I edit the image and close the program it corrupts the image irreversibly. If I use 'save as' option for the edited image, new saved file kept good without any problems but original file corrupts again.

B. Göktürk Bindal

Pilot CPL(A), FI(A) B.Sc. Mech. Eng.

Phone: +90 532 415 67 77


From: Kevin Routley @.> Sent: Sunday, October 24, 2021 8:06 PM To: d2phap/ImageGlass @.> Cc: banshee24 @.>; Author @.> Subject: Re: [d2phap/ImageGlass] after editing/cropping an image, thumbnail picture of the image is not refreshed (#1134)

Enabling the "Preserve Modify Date on Save" is what is causing the problem. Windows Explorer will only update the thumbnail when the modify date is changed.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/d2phap/ImageGlass/issues/1134#issuecomment-950359339, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVQBKEQILDPG4D7HSSPF7Q3UIQ4K3ANCNFSM5DP7KH2A. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

fire-eggs commented 2 years ago

OK, that sounds like a nasty problem! I'll take a look. For completeness, could you tell me what file format the original image is in? (png, jpeg, etc) Thanks!

banshee24 commented 2 years ago

Very strange, now it works both with .JPG and .PNG . I think it started to work after rebooting my PC. Btw I found another bug about that. That bug behaves differently both on JPG and PNG; For .JPG if you close the photo quickly just after editing the photo, it corrupts the file permanently, but if you wait just a bit after editing and then close the program it does not corrupt the file. For PNG; if you close the program quickly after editing, it just does not apply the changes on file. Here is my system;

[cid:c2c64fda-5667-4c75-a26b-98093f2d80b8]

May I also send you suggestions time to time in terms of design or you are working on just debugging? I really enjoy using this program, its pure design and availability of interface personalization is really cool. 🙂

B. Göktürk Bindal

Pilot CPL(A), FI(A) B.Sc. Mech. Eng.

Phone: +90 532 415 67 77


From: Kevin Routley @.> Sent: Monday, October 25, 2021 5:38 PM To: d2phap/ImageGlass @.> Cc: banshee24 @.>; Author @.> Subject: Re: [d2phap/ImageGlass] after editing/cropping an image, thumbnail picture of the image is not refreshed (#1134)

OK, that sounds like a nasty problem! I'll take a look. For completeness, could you tell me what file format the original image is in? (png, jpeg, etc) Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/d2phap/ImageGlass/issues/1134#issuecomment-950996485, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVQBKEQKJGIJCWVYOYFWTE3UIVTW5ANCNFSM5DP7KH2A. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

fire-eggs commented 2 years ago

For .JPG if you close the photo quickly just after editing the photo, it corrupts the file permanently, but if you wait just a bit after editing and then close the program it does not corrupt the file. For PNG; if you close the program quickly after editing, it just does not apply the changes on file.

Sorry for the late reply, my day went all sideways.

I've not had a chance to dig into the details, but what you describe matches what I recall. The process of saving a file is not currently coordinated with app shutdown. This means IG can shut down during the middle of saving the file, resulting in corruption or no output.

Waiting a little bit after editing the file before closing IG should work. Apparently, "preserve modify date on save" also solves the problem, but I don't yet know why! I'll poke at this when I have a chance, you should use one of the workarounds in the meantime ...

May I also send you suggestions time to time in terms of design or you are working on just debugging? I really enjoy using this program, its pure design and availability of interface personalization is really cool.

Thanks, and glad to hear it!

I have no objection to reading your design suggestions, might provide me with some inspiration. Feel free to open an issue containing your thoughts. It'll be up to @d2phap to decide if anything is incorporated.

fire-eggs commented 2 years ago

Recently posted to ImageGlass+ group:

Warning: ImageGlas destroys images if saving after editing set and viewer scolled forwards and backwards shortly after editing!

Again, the same problem: image save is asynchronous but not coordinated. By navigating backward, the user is hitting the image during the save, causing file corruption.

gsokoll commented 2 years ago

How about disabling the navigation buttons while saving is underway? I've had the unpleasant experience of several images being irreversibly corrupted by this bug. ImageGlass now uninstalled...

d2phap commented 2 years ago

Please try the latest build of IG Moon which is to attempts to fix this issue. https://imageglass.org/moon Note that, the thumbnail bar is flashing when the app is busy, I will fix later.