Imagick « Mikko’s blog

Beaucoup de tutoriels au sujet d’ImageMagick (Utile pour le plugin doc2img)

http://valokuva.org/?cat=1

Les articles publiés sur le site

  • More Imagick refresh

    4 octobre 2013, par Mikko KoppanenImagick, PHP stuff

    I’ve committed quite a few changes lately, mainly removing excessive macro usage and making the code more robust. Large amounts of the code was written about six years ago and a lot of things have changed since. Among other things, I’ve probably become a lot better in C.

    Under the hood ImagickPixelIterator went through almost a full rewrite, a lot of the internal routines have been renamed and improved and I am happy to say that most of the (useless) macros have been removed.

    Some of the user visible/interesting features added recently:

    Countable

    Imagick class now supports Countable interface and calling count on the object returns amount of images currently in memory. For example for PDF files this is usually the amount of pages. This is purely syntactic sugar as the functionality was available before using the getNumberImages method. The usage of the countable is pretty simple: 021-countable.phpt.

    writeImageFile

    After tracking down (what I thought was) a bug related to writeImageFile not honouring the format set with setImageFormat I was advised that the format actually depends on the filename. The filename is set during reading the image and just calling setImageFormat and writeImageFile would cause the original file format to be written in the handle.

    There is now an additional parameter for writeImageFile for setting the format during the operation. The following test demonstrates the functionality and the issue: 022-writeimagefileformat.phpt.

    Memory Management

    One of the things that pops up now and then (especially from shared hosting providers) is whether Imagick supports PHP memory limits. Before today the answer was no and you needed to configure ImageMagick separately with reasonable limits.

    In the latest master version there is a new compile time flag –enable-imagick-zend-mm, which adds Zend Memory Manager support. This means that Imagick will honour the PHP memory limits and will cause “Out of memory” error to be returned in case of overflow. The following test demonstrates the “usage”: 023-php-allocators.phpt.

  • Imagick refresh

    25 septembre 2013, par Mikko KoppanenImagick

    After some hiatus I’ve been getting back on fixing bugs on Imagick and getting the code into more representable condition. This hiatus has been a result of busy work schedule and getting a new start-up running in Kuala Lumpur.

    While fixing a bug related to clone keyword I came across the following resource: http://www.rubblewebs.co.uk/imagick/. The page contains quite a nice collection of Imagick operations and is definitely worth checking out.

    On the other news, the development has been moved to Github. As I’ve been the most active developer of Imagick in the past years I decided to move the code to Github where rest of my projects are located: https://github.com/mkoppanen/imagick. For the past few days there has been quite a lot of development, mainly working on removing the excessive use of macros in the code to make things more readable and debuggable. This might be a good place to give thanks to Remi for fixing quite a lot of compile warnings and raising bugs regarding Fedora Packaging Policy. Most likely there will be a couple of beta releases in the near future.

    As mentioned in the previous post Windows builds are now available via http://windows.php.net and my builds provided here should be considered obsolete.

  • Imagick refresh

    25 septembre 2013, par Mikko KoppanenImagick

    After some hiatus I’ve been getting back on fixing bugs on Imagick and getting the code into more representable condition. This hiatus has been a result of busy work schedule and getting a new start-up running in Kuala Lumpur.

    While fixing a bug related to clone keyword I came across the following resource: http://www.rubblewebs.co.uk/imagick/. The page contains quite a nice collection of Imagick operations and is definitely worth checking out.

    On the other news, the development has been moved to Github. As I’ve been the most active developer of Imagick in the past years I decided to move the code to Github where rest of my projects are located: https://github.com/mkoppanen/imagick. For the past few days there has been quite a lot of development, mainly working on removing the excessive use of macros in the code to make things more readable and debuggable. This might be a good place to give thanks to Remi for fixing quite a lot of compile warnings and raising bugs regarding Fedora Packaging Policy. Most likely there will be a couple of beta releases in the near future.

    As mentioned in the previous post Windows builds are now available via http://windows.php.net and my builds provided here should be considered obsolete.

  • Windows again

    24 septembre 2013, par Mikko KoppanenImagick

    Seems like the new Windows build system is online and Imagick for Windows is now provided here:

    http://windows.php.net/downloads/pecl/releases/imagick/

  • Windows again

    24 septembre 2013, par Mikko KoppanenImagick

    Seems like the new Windows build system is online and Imagick for Windows is now provided here:

    http://windows.php.net/downloads/pecl/releases/imagick/