filename.psd[0] fast with convert but slow with PythonMagick

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
clawsoon
Posts: 6
Joined: 2017-01-12T10:41:23-07:00
Authentication code: 1151

filename.psd[0] fast with convert but slow with PythonMagick

Post by clawsoon »

I'm thumbnailing large (100MB-2GB) PSD files from within a Python application.

Appending "[0]" to the input filename when using "convert" from the command line gives me a 4-6x speedup, with reduced disk and memory footprint. From what I've read, this is because it's only reading the first layer of the image in. This is very good.

However, appending "[0]" to the input filename with:

img = PythonMagick.Image(filename + "[0]")

...doesn't speed me up at all. The Python process does heavy disk access, apparently (based on bandwidth*time) many times the size of the file.

Is there something different I should be doing with PythonMagick.Image() in order to get the same speedups I see with convert filename.psd[0]?

Thanks!

Andrew
Post Reply