Page 1 of 1

[Solved] Error converting DPX to TIFF

Posted: 2014-02-19T03:16:58-07:00
by snibgo
On Windows 8.1, IM v6.8.8-7 (downloaded yesterday; it claims to be 6.8.8-5).

This arises from a thread in Users, viewtopic.php?f=1&t=25023

The OP has a DPX file, accessible in a zip at https://www.dropbox.com/sh/p4bg3ao7dorxf9u/sIhiU_216R

I tried converting with

Code: Select all

convert BaseUp_DPX_COLOR_10Bit_016.dpx t.tiff
IM can read and convert t.tiff. However, Windows Photo Viewer says t.tiff is corrupt. Gimp opens it without objection, but shows a blank (transparent black) image. I get the same result from older versions of IM.

The following is more successful:

Code: Select all

convert BaseUp_DPX_COLOR_10Bit_016.dpx t2.png
convert t.png t2.tiff
t2.png and t2.tiff can be read by any program without problem.


On the thread I mentioned, fmw42 reports a different problem reading the same DPX file. I can't reproduce his problem, so I'll leave him to report it.

Re: Error converting DPX to TIFF

Posted: 2014-02-19T04:54:47-07:00
by magick
The resulting TIFF image is 10-bits. Its likely that the viewers you mentioned do not support 10-bit TIFF images. Try
  • convert BaseUp_DPX_COLOR_10Bit_016.dpx -depth 16 test.tif

Re: Error converting DPX to TIFF

Posted: 2014-02-19T05:03:01-07:00
by snibgo
Ah, oops, I should have spotted that. Yes, "-depth 16" enables other software to see it. Thanks.

Re: Error converting DPX to TIFF

Posted: 2014-02-19T05:12:20-07:00
by dlemstra
According to this page 'http://www.libpng.org/pub/png/book/chapter08.html' libtiff only support reading 1-, 2-, 4-, 8-, and 16-bit images. And according to this SO post (http://stackoverflow.com/questions/7068 ... -libtiff-c) the tiff specifications do not specify how to store 10 bit. Maybe we should always change the bit depth to a power of two before writing a tiff image?

Re: [Solved] Error converting DPX to TIFF

Posted: 2014-02-19T10:16:46-07:00
by fmw42
I tested using -depth 16 earlier in this post and it does not work for tiff, but does for png.