Reading alpha data from CMYK TIFF

[email protected] Mon, 10 Feb 2003 14:06:41 -0500
Newsgroups gmane.comp.video.image-magick.windows,gmane.comp.video.image-magick.user
Message-ID <[email protected]>
I'm trying to read the alpha data for a CMYK TIFF image using
ImageMagick 5.5.4 on Windows 2000.  I'm using the call to GetIndexes()
which, as I understand it, is the only way to get the alpha data for
CMYK.

However, when I try to read the data, I get an access violation.  I'm
using something like:

      alpha = GetIndexes(image);
      for (row = 0; row < image->rows; row++)
      {
          for (col = 0; col < image->columns; col++)
          {
              bitData *= 2;
              if (alpha[(row*(image->columns))+col])
                   bitData |= 1;
                   .
                   .
                   .

However, I'm getting on access violation from the refernece to
alpha[(row*(image->columns))+col], suggesting that GetIndexes() is not
returning enough data.

Any clues on this?  I've put the test image and the sample program I'm
testing with at:

   ftp://ftp.pfdstudio.com/pub/BigE-CMYK-ALPHA.tif
   "                         "/demo.c


Any tips or suggestions would be *greatly* appreciated.

Thanks very much.

-pd


-- 
--------
    Peter Davis                               Pageflex Inc
    617-520-8345                          215 First Street
    617-868-0784 (FAX)                 Cambridge, MA 02142
    [email protected]      http://www.pageflexinc.com

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/LIgTpC/vN2EAA/xGHJAA/nhFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/