Annotator icon indicating copy to clipboard operation
Annotator copied to clipboard

Allow an annotated image to be edited after reload

Open longwave opened this issue 6 months ago • 6 comments

Thanks for this - it's an invaluable tool for Ubuntu.

I'm using it to annotate complex screenshots and would like to be able to reload the image with annotations and edit them again; however this doesn't seem possible? I thought that SVG export might let me edit existing annotations after reloading, but this doesn't seem to work. Would it be possible to add either SVG or a custom save file format that allows annotations to be updated and re-exported?

longwave avatar Jul 03 '25 13:07 longwave

I would imagine that this would be possible to do. Do you expect this new save format to include the annotated image (and any other images added) such that the one file can be used on another machine and be expected to work even if the images do not exist on the other machine?

phase1geo avatar Jul 05 '25 17:07 phase1geo

I think that makes the most sense. I don't see any value in being able to load annotations against a different original image? Having it portable between machines as a single file would allow it to be emailed and worked on by another person for example.

I haven't looked at how things are done internally but similar to the DOCX format I think a simple implementation would be a zip file containing the image(s) and a binary or XML structure containing the annotation metadata.

longwave avatar Jul 08 '25 10:07 longwave

If you want to give things a try before a new Annotator release is available, I have the work done in the "export-editable" git branch of the project. You will need to build from source, but then you should be able to load a file, add annotations, and export it as an "Annotator" file type. If you close Annotator after exporting, you can open the .annotator file that you saved and things should look the way they were before closing the app (and those elements should be editable still).

If you make further changes, you will need to re-export again to save those changes (i.e., I'm not saving the changes back to the original file).

When exporting to "Annotator" format, you can choose to include the used images in the saved file or not. Including the images will make the saved file much larger (obviously), but you should be able to use the file on a different system and still see the same thing. If you choose to not include the images, the file size will be much smaller.

If you choose to test things out, let me know if you encounter any issues.

phase1geo avatar Jul 09 '25 04:07 phase1geo

I am kinda curious to know why you would want to re-edit a previously annotated image. I don't think that this is a common use case for image annotation tools (as far as I'm aware).

phase1geo avatar Jul 09 '25 04:07 phase1geo

Thanks - I wasn't expecting this to be worked on so quickly! I will try this out soon!

My use case is I have a complex data-driven website, with a large number of pages with fields that are pulled from different sources. I am using Annotator to label screenshots of these pages with the fields and their sources as a form of documentation; given the annotation takes some time to produce and then requires a round of QA to ensure correctness, it is useful to be able to go back and correct mistakes without having to recreate the entire annotation or try to edit a previously saved export.

longwave avatar Jul 09 '25 11:07 longwave

Thanks for sharing that.

FYI, I'm seeing some issues saving and restoring resized and cropped images. I have just pushed some changes to the branch to fix the resize issues, but I have not yet fixed issues with cropped images.

phase1geo avatar Jul 10 '25 22:07 phase1geo