stylix icon indicating copy to clipboard operation
stylix copied to clipboard

Document supported image file formats

Open danth opened this issue 7 months ago • 2 comments

We should document which file formats are supported for the stylix.image option.

I think the easiest way to make this guarantee would be to say that we support everything which magick convert can take as an input, and then ensure that each module uses magick convert before passing the image to the target application.

It would be good to also keep this conversion logic in a central module, to ensure that magick convert is only run once for each output file format.

danth avatar May 21 '25 14:05 danth

It would be good to also keep this conversion logic in a central module, to ensure that magick convert is only run once for each output file format.

This could be added to the image option's apply function:

https://github.com/nix-community/stylix/blob/f6c5aaa4f8b70ec0bf995be43311c38be3131776/stylix/palette.nix#L31-L43

trueNAHO avatar Jul 13 '25 16:07 trueNAHO

True, although it would need to provide access to more than one output file type, so we'd have to do that in a way which doesn't break existing usage of the option value. For example, by providing a derivation with a default file type, and providing alternative file types under passthru.

danth avatar Jul 13 '25 19:07 danth