Page 1 of 1

Problems reading a DPX file

Posted: Mon Feb 15, 2010 10:37 pm
by mertus
I'm trying to read a DPX file using the example wind32 C++ program using 3.11
It works for a 10 bit RGB file, but when I try the same thing with an RGBA 8 bit, the colors are screwed up

load_params.Origin = GFL_BOTTOM_LEFT;
load_params.ColorModel = GFL_BGR;

I looked at the data and discovered that there was no Green channel. So I did
load_params.Origin = GFL_BOTTOM_LEFT;
load_params.ColorModel = GFL_BGR;
Should this give me BGRA, but when I looked the data, the 2an channel was the alpha channel, BAGR,
The picture displays fine if I use this format.

What do I need to do in the load-params to get it to read correctly?

Thank you

Here is the relevant header for the DPX file

First 4 bytes of file: SDPX
ulMagicNumber: 1396985944
caVersionNumber: "V1.0"
fHighDataQuantity: 2.0469999
fLowDataQuantity: 0.00000000
ucBitSize: 8
ucColorimetricSpec: 2
ucDescriptor: 51 (R,G,B,alpha)
ucTransferCharacteristic: 2
ulDataSign: 0
ulEndOfImagePadding: 0
ulEndOfLinePadding: 0
ulHighDataValue: 255
ulLowDataValue: 0
ulOffsetToData: 8192
usEncoding: 0
usPacking: 0

Re: Problems reading a DPX file

Posted: Tue Feb 16, 2010 9:47 am
by xnview
There is many problem with DPX encoding, some software write BGR, and some others RGB.
Could you send me the DPX?

Re: Problems reading a DPX file

Posted: Tue Feb 16, 2010 6:24 pm
by mertus
I sent the file to you at webmaster@<-- removed* -->. It is RGBA but should show up as a grayscale image. The alpha is all zeros.