I have a problem reading data via my file format plugin.
I can read the different layers in the format in Lab color mode (8-Bit).
In the file there is a layer transparency mask (1 byte for every pixel), which is stored right before the image data.
Currently I tried 2 approaches:
1.
- Set transparencyPlane to 3
- Set loPlane, hiPlane to 3
- Set colBytes to 1
- Set rowBytes to image width
- Set data to a buffer with size of image width
- read row from the transparency mask
-> advanceState gives error (-30500)
2.
- read transparency mask completely (I know, bad idea)
- Set transparencyPlane to 3
- Set loPlane = 0, hiPlane = 3
- Set colBytes to 4
- Set rowBytes to image width * 4
- Set data to a buffer with size of image width * 4
- read row from file in a temp. buffer
- copy values from temp. buffer and transparency for every pixel to the data buffer
-> advanceState ok but image ks not correct in PS
I think there must be another, better way to apply this transparency mask.
Thank you for your help....