[dev] Horde_Image / polaroid-like stack

Michael Rubinsky mike at theupstairsroom.com
Mon Oct 15 20:07:20 UTC 2007


Quoting Jan Schneider <jan at horde.org>:

> 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.

I was hesitant to put it into Horde_Image for the same reasons as  
Chuck states, and was leaning towards using a Horde_Image_Decorator  
that can compose all the neecessary steps - once I get all the steps  
isolated and implemented as methods.  My concern, though, is that  
there might be too much difference between the gd implementation  
(assuming I or someone else can actually figure that out ;) and the im  
implementation to allow doing it outside of the concrete classes.




> Jan.
>
> --
> Do you need professional PHP or Horde consulting?
> http://horde.org/consulting/
>
>
> --
> Horde developers mailing list - Join the hunt: http://horde.org/bounties/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
>
> !DSPAM:4713c299159709584916798!
>



Thanks,
mike

--
The Horde Project (www.horde.org)
mrubinsk at horde.org

"Time just hates me. That's why it made me an adult." - Josh Joplin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: PGP Digital Signature
Url : http://lists.horde.org/archives/dev/attachments/20071015/a182bf7f/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 2013 bytes
Desc: PGP Public Key
Url : http://lists.horde.org/archives/dev/attachments/20071015/a182bf7f/attachment-0001.bin 


More information about the dev mailing list