Junior Member
Junior Member
twizted   2013-06-02, 02:43
#1

So, I just installed zenphoto for my roommate and they love it but they ran into a small issue of BMP images not being displayed, at least not the thumbnail. I narrowed down the issue, I think, to the 'imagick' extension not being installed/enabled/available on the server. So, I contacted my hosts support desk, Lunarpages, and inquired about having that enabled/installed on the server I am hosted on. I was informed in the reply that imagick is not available on any of their shared hosting servers, unless I want to shell out for their Dedicated or VPS services.

[b]My main question here is this. Is imagick some type of security risk or very server resource intensive?[/b]

I'm mainly wondering this because I've noticed in the past year that Lunarpage has become very nickle & dimey and I just can't figure why this would be some type of restricted extension for whatever reason, which I'm still waiting on a reply from the Lunarpages support team to explain.

Frustrated...

Member
Member
jphilbert   2013-06-02, 04:08
#2

imagick is server and resource HOG

Administrator
Administrator
acrylian   2013-06-02, 08:52
#3

@jphilbert: Really? Actually it is generally said to be more memory friendly than GD. Which is why we added support for it.

@twizted: Server configurations are quite different on hosts. I would recommend to look for another one if this one does not match your requirements.

Member
Member
jphilbert   2013-06-02, 11:13
#4

I know from experience that GD is easier to set up, as it comes bundled with PHP, whereas ImageMagick needs to be set up. If you both have them up-and-running, then go for ImageMagick, as it has a sightly better performance and support for more image formats.
Main difference between the two is the way batch-add is being done: when using GD, one image after the other is processed, which is good in terms of server load. Drawback is that you might have issues resizing larger pics (both in terms of dimensions and filesize), as you're limited by the memory assigned to PHP.
ImageMagick on the other hand is quite resources-hungry, and it will start a separate process for each pic that needs to be resized during batch-add, which can bring the server down."
I had ImageMagick installed on a server I managed I love the speed but I ended up removing it because every process that need to used had the potential to bring the server to 99% cpu utilization... not a good idea when its shared hosting.

Administrator
Administrator
acrylian   2013-06-02, 11:17
#5

Interesting info. thanks. So do you think we should extend this info here?:
http://www.zenphoto.org/news/problems-with-albums-and-images#workaround-2-use-imagick-instead-of-the-gd-libary

Member
Member
jphilbert   2013-06-02, 11:46
#6

Since we on the subject I noticed my host supports it ... but Zenphoto cant detect it ... any reason why? .. I am curious to see it will be a good solution and wont mind testing it who knows it may server me well.

As for changing the info I am not sure the requirements are different from server to server. I know its a nice alternative when it works and the server can handle the load.
ImageMagick is a better solution hands down I just know it can be a hog at times.


Just Host Web Hosting Help
ImageMagick
Problem:

Is ImageMagick installed on my account? 

Solution:

ImageMagick is installed on all of our hosting servers, located at:

              /usr/bin/convert

You can check versions with the following command:

             convert -version 

The ImageMagick/MagickWand extension for PHP is also available all servers. To invoke it, verify you have the following variable set in your php.ini:

              extension_dir = '/usr/lib64/php/modules'

Then, add the following line to your php.ini:

              extension=magickwand.so

For further information on configuring your account with the php.ini file, please see the article How do I change the PHP environment for my site with php.ini?.
Administrator
Administrator
acrylian   2013-06-02, 11:56
#7

We do only support ImageMagick via the PHP extension Imagick (as noted on the requirements..;-))

Member
Member
jphilbert   2013-06-02, 12:15
#8

Yea I noticed my service only support magickwand for ImageMagick when I asked why they said the the Imagick module is prone to take too many resources #gofigure

Oh well I screwed

Administrator
Administrator
acrylian   2013-06-02, 12:20
#9

Ah, ok. I don't know actually, maybe the author of our imagick module, Kagutsuchi, can.

Member
Member
jphilbert   2013-06-02, 13:06
#10

Well magickwand uses the same exact API and most functions yes I already tried to hack the lib-Imagick.php to see if it would work no cigar

Member
Member
jalves   2013-06-05, 14:09
#11

Hi, i'm using imagick in my vps and i have some problems, it takes too long to resize images. When batching a lot of images consumes all the memory available. I can't find a solution for this.
I've setup some resource limits in lib-Imagick.php that prevents all my memory from being consumed but it takes too much time to resize images. Using GD is almost instantly but the resized images are poor in quality..

Member
Member
kagutsuchi   2013-06-13, 04:31
#12

@twizted - I'd imagine it's an issue of support. Hosts needs to be able to support it if they add it, and for some hosts, it doesn't seem to be a priority. In your case, however, it sounds like your host considers Imagick to be "premium" functionality.

@jphilbert - The Imagick PHP extension and magickwand use the same functionality under the hood, but it's not interchangeable, as far as I know.

@jalves - Setting resource limits will slow your server down if the limits are exceeded. When you set a memory limit, ImageMagick will begin to use swap space on the hard disk instead. RAM is far, far faster than disk speed, so whenever memory runs out on your system, ImageMagick will simply continue processing on the disk, thus causing slow performance.

Member
Member
jalves   2013-06-13, 13:04
#13

Hi kagutsuchi,

thank you for your answer.
yes i know that.. but if i don't have limits all my memory is consumed and my server becomes unresponsive... i had to restart some times to get it back.
My galleries have 100 thumbs by page and i'm working with hi-res pictures (4000pxX3000px). Do you think it is too much? But even with 4 thumbs by page it gets too much time.. GD is much faster.. Could i have something wrong? I can't find anything to solve the problem..

Member
Member
kagutsuchi   2013-06-13, 13:16
#14

If GD works well, then use what works

Those images are quite large though and will consume much memory and begin to use swap with Imagick, regardless of resource limits.

FYI, this github issue should help with Imagick memory consumption, so it could be improved in the coming Zenphoto releases: http://github.com/zenphoto/zenphoto/issues/418

Member
Member
jalves   2013-06-13, 13:21
#15

Yes but GD puts some artifacts in resized images.. that's my problem. GD is fast but poor quality, Imagick is too slow but good quality.. There's no solution for my problem? :S

Member
Member
kagutsuchi   2013-06-14, 02:47
#16

The issue posted in my last post should help with resource usage, thus making Imagick faster.

Member
Member
jalves   2013-06-14, 10:05
#17

Thank you very very much @kagutsuchi!!! It just solved my problem!
Sorry i didn't noticed it before!
Just removed my resource limits and made the changes suggested in the link.
It is now faster than ever and perfect thumbs! You just saved my day! Thank you once again!
This should be committed for the next zp build!

Administrator
Administrator
acrylian   2013-06-16, 10:01
#18

Did you check your image settings? Actually GD does not put that much artefacts into images unless the compression is quite high.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.