Menu

#776 Official DCX sample file cannot be read from GraphicsMagick

v1.0_(example)
open
nobody
None
5
1 day ago
2 days ago
No

Graphics Magick refuses to load official DCX sample image listed here:
http://justsolve.archiveteam.org/wiki/DCX

D:\temp\30>gm.exe identify SAMPLE.DCX 
gm.exe identify: Improper image header (SAMPLE.DCX).
gm.exe identify: Request did not return an image.

I have analyzed file and it looks fine without any problems. My own tool can read it without any problems. It looks that .DCX reader implementation is faulty.

D:\temp\30>gconvert SAMPLE.DCX SAMPLE.png
 <<< GCONVERT >>> Convert picture format (c)1997-2026 F&TSoft, version 2.85
Loading
OK
1 Attachments

Related

Bugs: #776

Discussion

  • Jaroslav Fojtik

    Jaroslav Fojtik - 2 days ago

    Converted .DCX from my utility as a reference.

    Please note .DCX fileformat chart: https://formats.kaitai.io/pcx_dcx/

     

    Last edit: Jaroslav Fojtik 2 days ago
  • Bob Friesenhahn

    Bob Friesenhahn - 2 days ago

    I notice that latest ImageMagick 7 also cannot read this DCX file.

    In GM, the (initial?) problem seems related to a bytes-per-line value which is computed based on multiplying columns and bits-per-pixel. This file computes 216, but the code requires at least 217.

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2 days ago

    Where can we find the source code for your utility?

     
  • Jaroslav Fojtik

    Jaroslav Fojtik - 2 days ago

    I do not understand this limit. I do not remember to implement something like this.

    You can get my utility from here: https://ftsoft.com.cz/pictures/pictures.html
    It can be compiled under Linux, but it was not so heavily tested.

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2 days ago

    I discovered that many DCX files can no longer be read due to a problematic file size sanity check. I have committed a fix for that file size check. Unfortunately, the issue reported here is due to a different check.

     

Log in to post a comment.