Huluti / Curtail

Simple & useful image compressor
GNU General Public License v3.0
363 stars 40 forks source link

Indication that file compression was reverted #245

Open ARAKHN1D opened 1 month ago

ARAKHN1D commented 1 month ago

Follow-up to #229. Maybe this could be a toast? Another thing to consider is, should this happen only when Curtail manually reverts the file, or also when the compressors skip the compression? The latter might be harder to figure out.

Huluti commented 1 month ago

I thought that maybe we could add the indication on each row? Instead of the percentage of reduction. Maybe we could remove all the params that skip image if larger than original and rely on the system you added for all compressors?

ARAKHN1D commented 1 month ago

The indicator on each row is a better idea. Removing the skipping params would make implementing this easier, so maybe that's what we should do. What should the indicator be? Text that just says "Skipped" or "Reverted"?

Huluti commented 1 month ago

Or maybe instead of removing the skipping params, we could just check the old size against the new size and if new size is equal or superior we could write this text. "Skipped" is perfect for me. What do you think?

ARAKHN1D commented 1 month ago

Checking the size would probably be better. I also think "Skipped" is a good indicator, but this is technically incorrect for the system when Curtail is in overwrite mode. Since it overwrites the file first, that's technically reverting the file. Maybe the system could be updated to compress the temp file first, check if that's bigger or smaller, and then copy that file onto the original if it's smaller. This would allow for skipping the file in overwrite mode, but it would also mean successful compression would have one additional step. Would that be okay with you?

Huluti commented 1 month ago

It seems like a good idea for me! If you want to work on it and if you want some help let me know :)

ARAKHN1D commented 1 month ago

I'll work on it when I get the chance, and I'll ask you if I need help. Thanks :)