I want to make a package where some variables are initialized to images. but when i save the package, all images are in the form of ImageData
that are very long. how do i fix it ?
1 Answer
$\begingroup$
$\endgroup$
I´d recommend working in the frontend with the package stylesheet. You get all the fancy frontend features (typesetting, graphics...) but the file is maintained in package (.m) format.
All cells with the Code
style will be carried over into the package (in fact they are initialization cells). Upon opening, the content is parsed and displayed as an ordinary notebook.
.m
) file. $\endgroup$ImageData
? I would have expected them to be stored with headImage
, which is quite different (preserves the image metadata). $\endgroup$Image
.A simple image is stored as followsImage[CompressedData[" 1:eJxTTMoPSmNiYGAo5gASQYnljkVFiZXBLECOU2VJahJIShyI5YD4P33Av7// cEv+BWHc8t+efMBl6r8PdlwsrAEv/v3FJvv/sfeCI3OZ3f5jkwXJA0E9w5f/ 2K3++/vb/0zuXzhkgWA3Q9f/P9hN/vu5irkKh7VAPQcZNuPQCZLdx/DuDw6t QPDrJS6dIB/d7XqJ08F//m9kOIfLUUDw49kvnHIEAW5jqQ0AKuOioA== "], "Byte", ColorSpace -> "Grayscale", Interleaving -> None]
$\endgroup$