Closed johnomotani closed 2 months ago
I'm also interested in this feature natively supported in Makie.
My current workaround to add metadata (git hash) for .png
, .jpg
files is to use ExifViewer.jl
(xref https://github.com/JuliaImages/ExifViewer.jl/issues/24).
Closing this as duplicate of #576
Feature description
It can be useful to save some metadata in the file of a saved plot. For example for provenance tracking - if I am making a plot of some simulation data, I might want to save some identifier for the simulation (e.g. a UUID), the time-point used to make the plot, etc.
Cairo has a function for doing this for pdfs: https://www.cairographics.org/manual/cairo-PDF-Surfaces.html#cairo-pdf-surface-set-metadata
It would be great to be able to pass a keyword argument to add metadata, like
It seems like only certain metadata keys are supported (https://www.cairographics.org/manual/cairo-PDF-Surfaces.html#cairo-pdf-metadata-t), and I don't know if it's possible to add metadata to other output formats. I'd expect (and be happy to get!) an error if I ask to add metadata to a format that does not support it, or with a metadata key that is not allowed.
I guess this feature would need
cairo_pdf_surface_set_metadata()
to be exposed byCairo.jl
, so I'll open an issue there too and link it to this one.