Page 1 of 1

Pixel cache allocation failed

Posted: 2015-10-08T23:48:19-07:00
by kinger
Hello All,


Trying to convert 11Mb tif file (having 16Gb of RAM) and getting 'pixel cache allocation failed'.
Run as:

Code: Select all

convert.exe -debug all -thumbnail 133x133 "IMG_0064.tif[0]" "IMG_0064.jpg"

Code: Select all

...
2015-10-09T09:45:45+03:00 0:02.634 0.593u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteJPEGImage/2293/Coder
  Interlace: non-progressive
2015-10-09T09:45:45+03:00 0:02.641 0.608u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteJPEGImage/2307/Coder
  Quality: 0
2015-10-09T09:45:45+03:00 0:02.648 0.608u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteJPEGImage/2534/Coder
  Storage class: DirectClass
2015-10-09T09:45:45+03:00 0:02.656 0.608u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteJPEGImage/2536/Coder
  Depth: 8
2015-10-09T09:45:45+03:00 0:02.664 0.608u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteJPEGImage/2542/Coder
  Number of colors: unspecified
2015-10-09T09:45:45+03:00 0:02.671 0.608u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteJPEGImage/2544/Coder
  JPEG data precision: 8
2015-10-09T09:45:45+03:00 0:02.679 0.608u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteJPEGImage/2599/Coder
  Image colorspace is RGB
2015-10-09T09:45:45+03:00 0:02.686 0.608u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteJPEGImage/2601/Coder
  Sampling factors: 1x1,1x1,1x1
2015-10-09T09:45:45+03:00 0:02.694 0.608u 6.9.2 Coder convert.exe[12424]: jpeg.c/WriteProfile/2002/Coder
  icc profile: 560 bytes
2015-10-09T09:45:45+03:00 0:02.701 0.608u 6.9.2 Resource convert.exe[12424]: resource.c/AcquireMagickResource/312/Resource
  Memory: 399B/69.5KiB/15.874GiB
2015-10-09T09:45:45+03:00 0:02.707 0.608u 6.9.2 Resource convert.exe[12424]: resource.c/RelinquishMagickResource/1002/Resource
  Memory: 399B/69.1KiB/15.874GiB
2015-10-09T09:45:45+03:00 0:02.712 0.608u 6.9.2 Cache convert.exe[12424]: cache.c/DestroyPixelCache/991/Cache
  destroy IMG_0064.tif[0]
2015-10-09T09:45:45+03:00 0:02.717 0.608u 6.9.2 Resource convert.exe[12424]: resource.c/RelinquishMagickResource/1002/Resource
  Memory: 70.8KB/0B/15.874GiB
convert.exe: Unknown field with tag 34864 (0x8830) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/884.
convert.exe: Unknown field with tag 42033 (0xa431) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/884.
convert.exe: Unknown field with tag 42034 (0xa432) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/884.
convert.exe: Unknown field with tag 42036 (0xa434) encountered. `TIFFReadCustomDirectory' @ warning/tiff.c/TIFFWarnings/884.
convert.exe: pixel cache allocation failed `IMG_0064.tif' @ error/cache.c/OpenPixelCache/3559.
convert.exe: memory allocation failed `IMG_0064.tif' @ error/psd.c/ReadPSDChannel/1094.
convert -version:

Code: Select all

Version: ImageMagick 6.9.2-3 Q8 x64 2015-09-19 http://www.imagemagick.org

Re: Pixel cache allocation failed

Posted: 2015-10-08T23:54:09-07:00
by dlemstra
Can you add a link to your input image so we can test it?

Re: Pixel cache allocation failed

Posted: 2015-10-09T00:23:46-07:00
by kinger

Re: Pixel cache allocation failed

Posted: 2015-10-09T01:30:19-07:00
by dlemstra
It seems your image contains an invalid Photoshop layer. I just pushed a fix to our git repository to improve the error message. You can execute the command below when you don't care about the layers:

Code: Select all

convert -define tiff:ignore-layers=true "IMG_0064.tif[0]" -thumbnail 133x133 "IMG_0064.jpg"

Re: Pixel cache allocation failed

Posted: 2015-10-09T09:27:25-07:00
by kinger
Thanks, it works.