I'm not sure myself how hard this would be to add.
http://www.imagemagick.org/api/magick-image.php#MagickExportImagePixels
does not obviously provide a mechanism to retrieve the index. But I haven't
looked extensively.
In the longer-term, there will be multiple readers supported, so the answer to
your question will likely depend on the reader.
--Tim
On Wednesday, May 13, 2015 11:18:10 PM Yakir Gagnon wrote:
> In Images.jl, is it possible to read an indexed image so that the Type of
> the image is ImageCmap and one of its fields is the colormap?
>
> I tried this:
> (in shell)
> convert rose: +dither -colors 256 -type palette rose_palette.gif
> convert rose_palette.gif -format %r info:
> PseudoClass sRGB *=> this means it's an indexed image (with a palette)*
>
> and in Julia:
> julia> using Images
> julia> isdirect(imread("rose_palette.gif"))
> true *=> which means that it's not indexed...*
>
> Thanks in advance (probably) Tim!