NEWBIE: ImageMagick on vServer - too slow - How to install Single core Version?

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?".
Locked
bodomalo
Posts: 6
Joined: 2016-08-15T10:32:47-07:00
Authentication code: 1151

NEWBIE: ImageMagick on vServer - too slow - How to install Single core Version?

Post by bodomalo »

Hello

I am new to the Ubuntu and Linux world, so it is extreme hard for me to come along with all those commands. But I need help.

I use ImageMagick via PHP scripts.

$image = new->Imagick();

Saving an jpg from PDF file takes 30-60 seconds on my Virtual Server. Crazy.

phpinfo() shows me I am using imagick module version 3.1.2, ImageMagick 6.7.7-10
Path to convert is usr/bin/

Can you tell me - step-by-step
a) HOW do I Install a imagick version that uses single-cores?
b) How do I tell PHP to use this NEW version, and not the older 3.1.2 module? (thats my biggest problem)
I think I already installed ImageMAgick 7.0.2.6 in usr/bin/ImageMagick-7... but I can not use it. It also changed from "convert" to "magick.sh" (I think??). So how do I tell php to use this version?

Is there any other solution?

$image = new->Imagick();
$image->setRessourceLimit(6,1); did not help. Has absolute no influence...

Since ever I use ImageMagick it was absolute useless to me. Takes minutes to convert 1 image...

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: NEWBIE: ImageMagick on vServer - too slow - How to install Single core Version?

Post by snibgo »

You are using a software stack: PHP calling IMagick, which calls ImageMagick. I have no experience of PHP or IMagick and can't help you there.

In turn, ImageMagick calls Ghostscript to rasterize a PDF.
bodomalo wrote:Saving an jpg from PDF file takes 30-60 seconds on my Virtual Server.
Some jobs take a long time. It's worth testing just ImageMagick and Ghostscript:

Code: Select all

convert -density 300 -units PixelsPerInch in.pdf out.jpg
"-density 300 -units PixelsPerInch" is optional. It controls the granularity of the rasterization, so it has a major impact on performance, quality and output filesize.

Another point: does your PDF contain vector data? Some PDF files are simply wrappers for raster images, so the rasterization process is a waste of time, and almost always reduces quality. In such cases, ImageMagick is the wrong tool for the job. "pdfimages" is more suitable.
snibgo's IM pages: im.snibgo.com

Locked