[Solved] Error converting DPX to TIFF

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

[Solved] Error converting DPX to TIFF

Post 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.
Last edited by snibgo on 2014-02-19T05:03:25-07:00, edited 1 time in total.
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Error converting DPX to TIFF

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Error converting DPX to TIFF

Post by snibgo »

Ah, oops, I should have spotted that. Yes, "-depth 16" enables other software to see it. Thanks.
snibgo's IM pages: im.snibgo.com
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Error converting DPX to TIFF

Post 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?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: [Solved] Error converting DPX to TIFF

Post by fmw42 »

I tested using -depth 16 earlier in this post and it does not work for tiff, but does for png.
Post Reply