Page 1 of 1
Lab and TXT-Format
Posted: 2007-10-01T23:48:48-07:00
by unnamedguy
hi magickians,
i’ve a tiny problem to convert a Lab-TIFF file to TXT. it seems that imagemagick converts Lab-TIFF to RGB-TXT automatically. is there an option to convert an Lab-TIFF to an Lab-TXT file? if not: does anybody knows a work around to get the Lab-TIFF into a human readable file format?
thanx a lot
andreas
Re: Lab and TXT-Format
Posted: 2007-10-02T17:14:57-07:00
by anthony
You could separate the LAB channels using -separate, then output each channel as a TXT: image or a simpler PGM list of numbers.
Code: Select all
convert image.tiff -colorspace LAB -separate -compress none LAB_channel_%d.pgm
The -compress none overrides the default 'binary' compression for the PGM image file format to produce a text file of the image values, with a simple small header.
At this time the TXT, ImageMagick pixel enumeration format only understands
RGB and RGBA colorspace images.
If you ask (on developers forum), it may be possible for the TXT; image format can be extended to enclude the colorspace of the output image, allowing you to output LAB images more directly, while still alowing IM to read such a image format. The coder needs to understand colorspace for both the input and output directions.
Re: Lab and TXT-Format
Posted: 2007-10-03T04:39:36-07:00
by unnamedguy
thanx for your answer, but this one does not work for me. Lab has 3 axes, one for luminance and two describing the colors. the imagemagick-txt-format works fine with rgb and cmyk images. the only thing it should do is: read the color information and write down the values, nothing else. your example creates 3 files with – i think – 16 bit data, from a picture which has only 8 bit.
i’ll try to explain it for the developers
thanx anyway.
andreas
Re: Lab and TXT-Format
Posted: 2007-10-03T19:52:08-07:00
by anthony
The next release which is beta testing right now will have LAB colorspace TXT: output (or any other colorspace
) You can use -depth to set the output quality for the files, otherwise it will default to your compile time IM Q level.