Page 1 of 1

Blank/black image when streaming from TIFF64 (6.7.9-9)

Posted: 2012-10-11T09:04:28-07:00
by wildbug
Upon upgrading from 6.7.8-7 to 6.7.9-9 my parallel tiling script started producing black tiles. Reverting to 6.7.8-7 fixes the problem; I also installed 6.7.9-10 to confirm that it still exhibits the same issue (it does). I'm using the stream utility to read strips from very large files (usually BigTIFF) then piping to convert to tile the strip.

This is a simplified command line (the second one, of course) that still produces the problem:

Code: Select all

$ identify 27277.tiff
27277.tiff TIFF64 54018x24444 54018x24444+0+0 8-bit sRGB 3.9616GB 0.000u 0:00.000
$ stream -map rgb -storage-type char -extract 400x300+0+0 27277.tiff'[0]' - | convert -depth 8 -size 400x300 rgb:- /tmp/tiles/27277,0,0.jpg
On Gentoo Linux amd64.

Code: Select all

ImageMagick is configured as follows. Please verify that this configuration
matches your expectations.

Host system type: x86_64-pc-linux-gnu
Build system type: x86_64-pc-linux-gnu

                  Option                        Value
-------------------------------------------------------------------------------
Shared libraries  --enable-shared=yes           yes
Static libraries  --enable-static=no            no
Module support    --with-modules=yes            yes
GNU ld            --with-gnu-ld=yes             yes
Quantum depth     --with-quantum-depth=16       16
High Dynamic Range Imagery
                  --enable-hdri=yes             yes

Delegate Configuration:
BZLIB             --with-bzlib=yes              yes
Autotrace         --with-autotrace=no           no
Dejavu fonts      --with-dejavu-font-dir=/usr/share/fonts/dejavu        /usr/share/fonts/dejavu/
DJVU              --with-djvu=no                no
DPS               --with-dps=no         no
FFTW              --with-fftw=yes               yes
FlashPIX          --with-fpx=yes                yes
FontConfig        --with-fontconfig=no          no
FreeType          --with-freetype=yes           yes
GhostPCL          None                          pcl6 (unknown)
GhostXPS          None                          gxps (unknown)
Ghostscript       None                          gs (9.05)
Ghostscript fonts --with-gs-font-dir=/usr/share/fonts/urw-fonts /usr/share/fonts/urw-fonts/
Ghostscript lib   --with-gslib=no               no
Graphviz          --with-gvc=no         
JBIG              --with-jbig=no                no
JPEG v1           --with-jpeg=yes               yes
JPEG-2000         --with-jp2=yes                yes
LCMS v1           --with-lcms=no                no
LCMS v2           --with-lcms2=no               no
LQR               --with-lqr=no         no
LZMA              --with-lzma=no                
Magick++          --with-magick-plus-plus=yes   yes
OpenEXR           --with-openexr=no             no
PERL              --with-perl=no                no
PANGO             --with-pango=no               no
PNG               --with-png=yes                yes
RSVG              --with-rsvg=yes               yes
TIFF              --with-tiff=yes               yes
WEBP              --with-webp=no                no
Windows fonts     --with-windows-font-dir=no    none
WMF               --with-wmf=no         no
X11               --with-x=yes                  yes
XML               --with-xml=yes                yes
ZLIB              --with-zlib=yes               yes

X11 Configuration:
      X_CFLAGS        = 
      X_PRE_LIBS      = -lSM -lICE
      X_LIBS          = 
      X_EXTRA_LIBS    = 

Options used to compile and link:
  PREFIX          = /usr
  EXEC-PREFIX     = /usr
  VERSION         = 6.7.9
  CC              = x86_64-pc-linux-gnu-gcc -std=gnu99 -std=gnu99
  CFLAGS          = -fopenmp -march=core2 -O2 -pipe -Wall -pthread
  CPPFLAGS        = -I/usr/include/ImageMagick
  PCFLAGS         = -fopenmp
  DEFS            = -DHAVE_CONFIG_H
  LDFLAGS         = -Wl,-O1 -Wl,--as-needed -L/usr/lib
  MAGICK_LDFLAGS  = -L/usr/lib64 -Wl,-O1 -Wl,--as-needed -L/usr/lib
  LIBS            = -lMagickCore -lfreetype -lfftw3 -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz -lm -lgomp -lpthread -lltdl
  CXX             = x86_64-pc-linux-gnu-g++
  CXXFLAGS        = -march=core2 -O2 -pipe -pthread
  FEATURES        = HDRI OpenMP 
What else can I provide?

Re: Blank/black image when streaming from TIFF64

Posted: 2012-10-11T09:39:53-07:00
by fmw42
I do not know much about bigtiff or the minimum version of libtiff that may be needed. But to verify that you have installed libtiff properly and IM actually sees it, use

convert -list configure | grep -i "delegates"

Re: Blank/black image when streaming from TIFF64

Posted: 2012-10-11T10:15:41-07:00
by wildbug
It's the stream utility, and also happens with small PNGs.

With ImageMagick-6.7.9-10:

Code: Select all

$ identify 27277-small.png 
27277-small.png PNG 844x381 844x381+0+0 8-bit DirectClass 549KB 0.000u 0:00.000
$ stream -map rgb -storage-type char -extract 400x300+0+0 27277-small.png'[0]' - | hexdump                                                      
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
0057e40
With ImageMagick-6.7.8-7 it produces the expected image of the same length (0057e40).

Re: Blank/black image when streaming from TIFF64 (6.7.9-9)

Posted: 2012-11-30T14:18:55-07:00
by wildbug
Were you able to duplicate this? I just downloaded svn trunk, and stream still outputs nothing but null bytes.

(As I mentioned in my second post, it's not TIFF64-specific; that was an irrelevant detail as it turns out.)

Re: Blank/black image when streaming from TIFF64 (6.7.9-9)

Posted: 2012-11-30T18:12:13-07:00
by magick
We can reproduce the problem you posted and will have a patch to fix it in ImageMagick 6.8.0-8 Beta within a few days. Thanks.

Re: Blank/black image when streaming from TIFF64 (6.7.9-9)

Posted: 2012-12-03T07:59:37-07:00
by wildbug
That's great; thank you!