Page 1 of 1
DPX to TIF bug
Posted: 2010-09-29T19:24:00-07:00
by salvati.marc
Hello everyone,
I tried a conversion of a DPX file (Log, 10 bits) to a Tif file.
And my tif file gets darker than the original file.
then I tried to convert first to EXR and then to Tif.
The result Tif file is the same color as expected from the Dpx file.
I suppose some default parameter are used in the DPX to Tif conversion, not used in the DPX to EXR...
Or is it a bug? If someone had the same problem, and found a solution, let me know.
The command i run are really simple:
bad result(darker) in the tif file:
expected result in the tif file:
Code: Select all
convert myFile.dpx myFile.exr
convert myFile.exr myFile.tif
Re: DPX to TIF bug
Posted: 2010-09-29T19:29:44-07:00
by fmw42
Perhaps you should post a link to your dpx image so others can test it. Also you did not say what version of IM (and platform) you are using. So if it is old, perhaps an upgrade is in order.
Re: DPX to TIF bug
Posted: 2010-09-29T20:04:30-07:00
by salvati.marc
i m using the most recent version 6.6.4
I have to find a mean to give you a file to chek it.
Re: DPX to TIF bug
Posted: 2010-09-29T20:17:54-07:00
by salvati.marc
Ok i have a way to reproduce the problem.
convert -size 100x100 plasma:fractal -colorspace Log -depth 10 testFractal.dpx
convert testFractal.dpx -depth 16 testFractalWrong.tif
convert testFractal.dpx -depth 16 testFractal.exr
convert testFractal.exr -depth 16 testFractalRight.tif
I would like to know why testFractalWrong.tif and testFractalRight.tif are different...
Re: DPX to TIF bug
Posted: 2010-09-30T05:55:02-07:00
by Drarakel
salvati.marc wrote:I would like to know why testFractalWrong.tif and testFractalRight.tif are different...
With IM v6.6.4-7 Q16, on Windows XP, I'm getting two identical images with these commands.
What exact IM version and operating system are you using?
Re: DPX to TIF bug
Posted: 2010-09-30T09:44:00-07:00
by salvati.marc
If you have downloaded the binary, then there is no EXR support... so i guess the testFractal.exr is not a exr file.
You have to compile from the source and enable EXR support with openEXR to be able to produce exr files.
Re: DPX to TIF bug
Posted: 2010-09-30T13:29:13-07:00
by Drarakel
Ah, that makes sense!
Re: DPX to TIF bug
Posted: 2010-10-01T05:22:01-07:00
by Drarakel
Can you upload your 'testFractalWrong.tif' and 'testFractalRight.tif' files somewhere? Just curious..
Re: DPX to TIF bug
Posted: 2010-10-03T19:49:47-07:00
by salvati.marc
Re: DPX to TIF bug
Posted: 2010-10-03T23:25:59-07:00
by Drarakel
Well, I don't know much about these formats.. But the first conversion to TIFF (testFractalWrong.tif) converts the values to RGB (16bit), while the second one (testFractalRight.tif) probably simply stores the Log values (as RGB).
If you want to recreate that in your DPX->TIFF conversion, so that you can see the Log values for a quick test, then try:
convert testFractal.dpx -depth 16 -set colorspace RGB testFractal2.tif
You should get the same output as with 'testFractalRight.tif'.
(Side note: I'm getting a completely different 'testFractalWrong.tif' than you - but that's probably also due to the different IM versions..)
Re: DPX to TIF bug
Posted: 2010-10-03T23:41:08-07:00
by salvati.marc
Since I dont specify any colorspace in theparameters, I think that both tif should be log like colors. Am i wrong?
changing to 16bit, does not mean changing to linear, does it?
Re: DPX to TIF bug
Posted: 2010-10-04T05:17:51-07:00
by Drarakel
I don't know much about these special formats and about Log. But sometimes I had similar difficulties when storing different colorspaces.
Regarding your case: Log is a separate colorspace for IM - and TIFF doesn't know that logarithmic RGB space. So, you have the wrong output format.
It could be compared to a conversion from e.g. a CMYK JPG to PNG. PNG can't store CMYK, so ImageMagick has to make an automatic (simple) conversion to RGB first.
And in your case, IM also has to do an automatic conversion to normal RGB when storing the DPX as TIFF. I don't know why it doesn't happen in your DPX->EXR->TIFF conversion. Seems that the EXR format is handled differently and the 'Log' attribute gets lost along the way or something.. So, one could say, 'testFractalRight.tif' is actually the wrong file.
As I said, if you really want to store the Log values as TIFF, then you have to fool IM by setting the colorspace value to something that is supported by the output file. A round trip from DPX to 16bit TIFF and back to DPX with the Log values:
convert testFractal.dpx -depth 16 -set colorspace RGB testFractal2.tif
convert testFractal2.tif -set colorspace Log -depth 10 testFractal3.tif