Bug 458959 - Overwrite already-saved screenshot when explicitly saving after annotating while using the "After taking screenshot, save file to default folder" setting
Summary: Overwrite already-saved screenshot when explicitly saving after annotating wh...
Status: CONFIRMED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 22.08.1
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-10 13:32 UTC by gudvinr+kde
Modified: 2025-03-05 09:00 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gudvinr+kde 2022-09-10 13:32:04 UTC
SUMMARY

When you annotate screenshot, spectacle creates 2 screenshot duplicates and when you save annotated file it also saves screenshot with applied annotations.

I can't say for all people but when I want to annotate screenshot, I never need to save original copy.
But when I don't want to annotate I just want this file to be saved without opening spectacle main window.

I have option to take screenshot on spectacle open disabled. And options to put screenshot into clipboard and save on disk enabled.

STEPS TO REPRODUCE
1. Create screenshot
2. Use "Annotate" button (from notification, didn't test other cases)
3. Draw something
4. Finish annotation
5. Save annotated file

OBSERVED RESULT

After step 1 spectacle saves screenshot.
After step 2 spectacle saves same screenshot to another file with new timestamp.
After step 5 spectacle saves annotated screenshot to another file with suffix "-1" added to filename.

EXPECTED RESULT

After step 5 spectacle modifies original file saved in step 1. In that case people who want to also have original file can use "Save As" instead, as it is done in most applications.

Or just save annotated file when you press "annotation done" and close window since I didn't open it in first place and issued annotation from notifications. In that case there could be some kind of setting that controls save behaviour (whether it overwrites file or creates new one).

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.6
Graphics Platform: Wayland
Comment 1 Nate Graham 2022-09-13 18:17:30 UTC
Are you using the "After taking screenshot, save file to default folder" setting, by any chance?
Comment 2 gudvinr+kde 2022-09-13 19:15:02 UTC
(In reply to Nate Graham from comment #1)
> Are you using the "After taking screenshot, save file to default folder"
> setting, by any chance?

Yes, I do. I meant that by "options <...> save on disk enabled". That's kinda main point of this issue.

I don't annotate screenshots most of the time so it'd be annoying to save them manually every time just to add annotations (and it won't solve issue with creating secondary annotated screenshot anyway).

But when I do annotate it suddenly creates rather bad experience because I need to explicitly save image because after you press "annotation done" annotation is not, in fact, done and it creates litter in screenshot folder.
Comment 3 Nate Graham 2022-09-15 16:02:33 UTC
Well, you kind of did it to yourself. :) You told Spectacle to auto-save after taking a screenshot, which it did. If you then annotate the screenshot, it's up to you to replace the already-saved screenshot.

Maybe we can special-case this, though.
Comment 4 gudvinr+kde 2022-09-15 16:14:08 UTC
Well, I'd say there is one real issue here:
1. Screenshot is saved as expected
2. When you call annotation, ANOTHER copy of same image is being created

This behaviour can't be explained by any of the settings spectacle has. And even if it did, it couldn't be a thing that anyone wants because saving 2 copies of the same message into same folder just doesn't make any sense from practical standpoint.

I agree that thing with 3rd image is not an issue per se and rather a bit of an annoyance.
Yes, I'd rather have it overwritten. It could be an option, even. "Overwrite image after annotation" or something like that.
But it is not a bug.
Comment 5 Cip 2025-03-05 09:00:05 UTC
Wanted to file a bug about screenshot naming behavior for annotated images and got redirected here. 

I always use "Save As" for annotated images and I've noticed that the "Save As" dialog will suggest as filename the very string defined in "Configure Spectacle -> Image Saving -> Filename:" e.g. `Screenshot_<yyyy><MM><dd>_<HH><mm><ss>` instead of say 'Screenshot_20250121_113120' IF the image has been modified by Spectacle's own editor. 

The behavior is odd if not a plain bug because the very same "Save As" dialog, when invoked from the same Spectacle window but WITHOUT any annotation done, will suggest the filename with the placeholders correctly replaced by actual values. 

Is it the same problem or I should open a separate issue for this?