ImageMagick without the PHP extension

Hello everyone,

First of all, I have to say that I'm fond of ZenPhoto.
I deployed it on a NAS Synology DS-207+ and my photos are stored locally on the NAS and fed from my laptop through Lightroom (images are 1000px largest side, so rather light).
I'm particularly fond of the dynamic album generation based on folders tree.

Feature request 1: use of ImageMagick without the PHP extension.
I noticed that Image caching is really really slow on such a NAS (128Mo RAM).

I started to dig up and the use of ImageMagick library, which is deployed by default on the NAS, or available through the package management utility IPKG.

The only thing is that the provided PHP does not offer the iMagick PHP extension. I tried to find a compiled version of this extension, without success. I tried to compile it by myself, no more success.

But the funny thing about this is that the default gallery manager of the NAS was anyway using ImageMagick binary (convert). As so was able Gallery3 when I tried it (before removing it).

My feature request would be the possiblity of using an available ImageMagick binary out of the PHP extension, instead of GD library.

This would allow a lot more people to use zenphoto, especially people owning products like Synology NAS.

Feature request 2: Image cache scheduler
Provide the possibility to refresh the html and image cache every day for example. Today I implemented a small script that accesses the gallery to trigger the cache.

These 2 feature would help the use of ZenPhoto on older/weaker environments.

Thanks a lot for your time!

Comments

  • Sorry to inform you that Zenphoto is written in PHP. Pretty much impossible to use anything as a support unless it has a PHP interface. Certainly it would not be a productive use of developer's time to "re-invent the wheel". There exists a PHP Imagick library so it would be pointless to duplicate it.

    You can set the timeout for the HTML cache to one day if that is what you want. As to the image cache, why would you want it to expire?
  • Thanks for your prompt answer.
    And sorry for mine being (too) long.

    Well I'm just looking for a way for the cache to go faster, as I'm convinced that the NAS is able to. The provided gallery (called PhotoStation), although not so customizable, was creating thumbnails and caches much more faster.
    But if I quit using it, it's because I wanted the flexibility ZenPhoto offers.

    Except mistake from my part, I was able to activate ImageMagick on Gallery3, which is also written in PHP. But I do not want to enter this debate. I tried g3 and did not like it. They might have implemented it in a way you're not willing to reproduce.

    My difficulty is that I use zenphoto together with a set of lightroom publishing service: each time I modify some photos, it is updated to the NAS. Last time something like 800 photos were refreshed, of which 600 were in the same album. And every time I have to log into the admin to refresh ImageCache, and it takes a very very very long time (several hours in that particular case).
    If I do not do that, zenphoto will be very slow to display some album pages where pictures were updated, due to the on-the-fly caching. And it can even go in timeout (in the 600 photos album case).

    This is why I'm looking for a way to improve that process on the one hand, or to trigger it by night on the other hand.

    For HTML cache, I already set it to 1 day and I placed a cron script to refresh it every day as well (in case of a new album for example). And I'm satisfied with that.
    For image cache, I still have to trigger it manually if I want to avoid my visitors a long and uncomfortable wait.

    I probably could upgrade my Synology, but I'm overall satisfied with it and I'm sure it could handle the task satisfyingly. And as noticed in the forum that you finally have a lot of synology users (normal, this box is awesome).

    Maybe I'll have a look to how GD and Imagick libraries are implemented in zenphoto, to see how far it could be transposed to command line calls. Not to replace the current one, but to offer an alternative. However I doubt I'll find the courage to do it:)

    Thanks anyway!
  • Feel free, but I do not understand why you would not simply install the existing libary rather than invent a new one.
  • acrylian Administrator, Developer
    I have to agree to my colleague that I don't understand why you want to use another libarary to access imagemagick if imagick does that already.
    Provide the possibility to refresh the html and image cache every day for example
    The html cache has already this option. The image cache does not because this is normally not needed. But as always we welcome any third party solution for specific personal needs. We gladly list everything on our extensions section.
  • It's possible to use ImageMagick directly, which I believe is what the feature request is for. It requires using `exec` to call `convert` and its ilk, which is, I believe, how some other gallery software functions. This is not something that I personally find useful, and I am not familiar enough with the CLI version of ImageMagick to feel comfortable coding this. If you are interested, I could point you in the right direction to get you started on developing the lib yourself.
Sign In or Register to comment.