Supporting 9-billion pixel PSB

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
AirMassZero
Posts: 1
Joined: 2012-10-27T19:30:35-07:00
Authentication code: 67789

Supporting 9-billion pixel PSB

Post by AirMassZero »

Hello,

I have a very large image in the Adobe PSB format and ImageMagick is telling me the following when trying to downscale and convert it:

Code: Select all

$ convert -resize 5% eso1242a.psb eso1242a.jpg
convert: unable to extend cache `eso1242a.psb': No such file or directory @ error/cache.c/OpenPixelCache/4115.
convert: no images defined `eso1242a.jpg' @ error/convert.c/ConvertImageCommand/3044.
I do not own a copy of Photoshop, but have downloaded a trial to verify the image is viewable and correct. The image is 24.6 GB and the dimensions are 108,200 by 81,500 pixels. Here is the website: http://www.eso.org/public/images/eso1242a/. A torrent file is available to download it via reddit: http://redd.it/121r3s.

I downloaded the latest version of ImageMagick as of this post, compiled from source

Code: Select all

$ convert -version
Version: ImageMagick 6.8.0-3 2012-10-27 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
I found this forum saying ImageMagick might be trying to allocate an insane amount of temporary storage: viewtopic.php?f=1&t=11494. This is the output I have:

Code: Select all

$ convert -list resource
File         Area       Memory          Map         Disk    Thread         Time
-------------------------------------------------------------------------------
 768     24.959GB    11.623GiB    23.245GiB    unlimited        12    unlimited
I hope I am not doing something stupid! Is there any advice anyone may have (purchasing Adobe Photoshop is not an option)?

Thank you!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Supporting 9-billion pixel PSB

Post by fmw42 »

try
convert eso1242a.psb -resize 5% eso1242a.jpg

What version of IM? What platform?

You are probably running out of memory. See http://www.imagemagick.org/Usage/files/#massive and http://www.imagemagick.org/script/archi ... tera-pixel


Search the IM archives for PSB

viewtopic.php?f=1&t=21563
viewtopic.php?f=3&t=20400
viewtopic.php?f=2&t=18905
viewtopic.php?f=1&t=17894

etc for many more resulting topics in the archives
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Supporting 9-billion pixel PSB

Post by magick »

You are running out of temporary disk space. Set the MAGICK_TEMPORARY_PATH environment variable to a disk partition with plenty of free space and try your convert command again. The conversion worked for us, albeit slowly since the pixels are pushed to disk.
Post Reply