[dev] Horde_Image / polaroid-like stack

Jan Schneider jan at horde.org
Mon Oct 15 19:46:16 UTC 2007


Zitat von Chuck Hagenbuch <chuck at horde.org>:

> Quoting Michael Rubinsky <mike at theupstairsroom.com>:
>
>> Starting to play around with implementing the "Polaroid style" stack
>>  (at least using IM or Imagick extension - the gd driver looks like
>> it  will be pretty tough).  Anyway, wanted to throw some ideas out
>> there  and get some opinions...
>>
>> 1) Add a type of thumbnailStack() method to Horde_Image_*:
>>
>>     function thumbnailStack($images, $w, $h)
>>
>> where $images is an array of various sized images, $w, $h are
>> dimensions for the thumbnails. The image that the Horde_Image object
>>  represents will serve as the "desk" image to place the thumbnails on.
>>
>> 2) Don't implement this in Horde_Image at all - do it in Ansel using
>>  IM/Imagick extension or if that's not present, revert to a single
>> thumbnail like we do now.
>
> I don't think that there should be a Horde_Image::thumbnailStack
> method; that seems much too specialized to be part of the Horde_Image
> api. If you can break down the necessary operations into generic
> Horde_Image::* calls, then you could create a separate object - either
> a Horde_Image_Decorator, or some other composite - that made it work.

I don't agree. While this is indeed a very specialized thing, I don't  
see why this shouldn't be made available globally. People can have  
other uses for that than Ansel. And contributing this back as some  
packaged code for imagick users is a nice bonus.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list