Pixel cache dimensions incompatible with image dimensions
Swiss army knife of image processing
Brought to you by:
bfriesen
GraphicsMagick 1.3.31 fails to convert the attached pict-file with the error message:
$ gm convert MARBLES.PCT MARBLES.JPG
gm convert: Pixel cache dimensions incompatible with image dimensions (MARBLES.JPG).
I can reproduce the problem on a Mac (Sierra, 10.12.6) with graphicsmagick installed via homebrew:
gm -version
GraphicsMagick 1.3.31 2018-11-17 Q16 http://www.GraphicsMagick.org/
Copyright (C) 2002-2018 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Feature Support:
Native Thread Safe yes
Large Files (> 32 bit) yes
Large Memory (> 32 bit) yes
BZIP yes
DPS no
FlashPix no
FreeType yes
Ghostscript (Library) no
JBIG no
JPEG-2000 yes
JPEG yes
Little CMS no
Loadable Modules yes
OpenMP no
PNG yes
TIFF yes
TRIO no
UMEM no
WebP no
WMF no
X11 no
XML yes
ZLIB yes
Host type: x86_64-apple-darwin16.7.0
Configured using the command:
./configure '--prefix=/usr/local/Cellar/graphicsmagick/1.3.31' '--disable-dependency-tracking' '--enable-shared' '--disable-static' '--with-modules' '--without-lzma' '--disable-openmp' '--with-quantum-depth=16' '--without-gslib' '--with-gs-font-dir=/usr/local/share/ghostscript/fonts' '--with-webp=no' '--without-x' '--without-lcms2' '--without-wmf' 'CC=clang' 'CXX=clang++' 'PKG_CONFIG_PATH=/usr/local/opt/libpng/lib/pkgconfig:/usr/local/opt/freetype/lib/pkgconfig:/usr/local/opt/jpeg/lib/pkgconfig:/usr/local/opt/jasper/lib/pkgconfig:/usr/local/opt/libtiff/lib/pkgconfig' 'PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.12'
Final Build Parameters:
CC = clang
CFLAGS = -g -O2 -Wall -D_THREAD_SAFE
CPPFLAGS = -I/usr/local/opt/freetype/include/freetype2 -I/usr/include/libxml2
CXX = clang++
CXXFLAGS = -D_THREAD_SAFE
LDFLAGS = -L/usr/local/opt/freetype/lib
LIBS = -lfreetype -lbz2 -lz -lltdl -lm -lpthread
and with a self compiled version under Debian Linux:
gm -version
GraphicsMagick 1.3.31 2018-11-17 Q8 http://www.GraphicsMagick.org/
Copyright (C) 2002-2018 GraphicsMagick Group.
Additional copyrights and licenses apply to this software.
See http://www.GraphicsMagick.org/www/Copyright.html for details.
Feature Support:
Native Thread Safe yes
Large Files (> 32 bit) yes
Large Memory (> 32 bit) yes
BZIP no
DPS no
FlashPix no
FreeType yes
Ghostscript (Library) no
JBIG yes
JPEG-2000 no
JPEG yes
Little CMS yes
Loadable Modules no
OpenMP yes (201307)
PNG yes
TIFF yes
TRIO no
UMEM no
WebP no
WMF yes
X11 no
XML yes
ZLIB yes
Host type: x86_64-pc-linux-gnu
Configured using the command:
./configure '--disable-installed' '--without-x' '--enable-shared' '--disable-static' '--prefix=/usr/local' 'CFLAGS=-O3 -frename-registers -funroll-loops -m64 -msse4.2' 'LDFLAGS=-lm'
Final Build Parameters:
CC = gcc -std=gnu99
CFLAGS = -fopenmp -O3 -frename-registers -funroll-loops -m64 -msse4.2 -Wall -pthread
CPPFLAGS = -I/usr/include/freetype2 -I/usr/include/libxml2
CXX = g++
CXXFLAGS = -pthread
LDFLAGS = -lm
LIBS = -ljbig -llcms2 -ltiff -lfreetype -ljpeg -lpng12 -lwmflite -llzma -lxml2 -lz -lm -lpthread
@bfriesen: Can you reproduce this problem? Do you need more information?
I will work on this issue as available time permits.
I have encountered this sample file before. As far as I am aware, GraphicsMagick has never displayed this image correctly. Instead I get an all black image. Modern ImageMagick seems to display it properly.
This problem is fixed now. The fix is provided by Mercurial changeset 16208:873fe3a5a171. Thanks for the report!