Skip to content

Add a simplified saving API for common use cases #135

@tlnagy

Description

@tlnagy

Currently, the saving API is extremely limited. Users can add tags to the IFDs to save a description or change the compression, etc. This is clunky and hard to use. It would be better to expose keywords for common properties such that you do the following:

img = rand(Gray{N0f8}, 10, 10)
TiffImages.save("img.tif", img; description = "test image", compression = :lzw)

Naturally, if the user is supplying a subtype of AbstractTIFF we would need a way to merge the provided tag values with the tags already present in the IFD of the image.

Some properties that I can imagine being useful to set this way are:

  • bigtiff
  • description
  • compression
  • orientation
  • X/Y resolution

Basically the API used in the ImageJ demo: https://tamasnagy.com/TiffImages.jl/dev/demos/common/imagej/#Writing-ImageJ-compatible-metadata should be easier to use/discover. We should still allow for the nitty gritty fine grained control of that example, but have a simpler option for folks too.

Thoughts @chrstphrbrns with regards to compression?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions