[Catalyst] (Beginner) Plugins

Alejandro Imass alejandro.imass at gmail.com
Tue Oct 24 15:06:05 BST 2006


Thanks for your ideas...

The issue is that the client specified that images be kept proportional no
matter the size of the browser, so if I resize the browser I have to
regenerate the image so it keeps in proportion with the new window size. One
would think this could be easily done just by changing the size with
JavaScript but:

a) Browser resizing distorts the images
b) The anchor for our images is the lower right hand corner and we have to
crop the top-left. This is because images can be of many different
proportions and the final layout has a fixed proportion.
c) The client wants the images to degrade to black on the right edge.

Obviously this requires server-side processing. I agree with you on
dynamically generating the images. In fact, I was thinking of using AJAX
with the Dojo plugin.

Now, regarding my original question on the use of plugins or not. Can you
tell me, like for dummies, what are the advantages or disadvantages of using
a Catalyst plugin or using the CPAN modules with a simple use. For example,
if I decide to dynamically generate the images would I need or have any
advantages or problems to make a plugin for Image::Magick?

Thanks again, Alejandro.



On 10/24/06, Yuval Kogman <nothingmuch at woobling.org> wrote:
>
> On Mon, Oct 23, 2006 at 21:35:03 -0400, Alejandro Imass wrote:
> > Wow, that was a prompt reply! I saw many of your plugins on CPAN!
> >
> > I just want to manipulate some images on the backend before I send them
> to
> > the page. From just one base image I want to generate images of several
> > sizes, and do some fancy stuff like making a degradation to black on the
> > right side of an image (probably by layering a black degradation on top
> with
> > ImageMagick). In any case, it's just some server-side image processing
> > before I use them on the page. The cache will be handled by me, I mean
> each
> > processed image will have a special name (extending the base image's
> name)
> > and will reside in the orignal's image directory. I will be responsible
> for
> > checking time-stamps and all that (in case the original image changed I
> will
> > re-generate with the first request).
>
> The only problem I see is with transformed images being cached, and
> then the client rerequesting the image without going to the page
> that generates the image.
>
> If this is a problem then you should make the transformed images
> dynamically generated, but I doubt this matters at all.
>
> I would make sure to do something like
>
>         foo/images/bah.jpg # original
>         foo/transformed/bah.jpg
>
> and not
>
>         foo/images/bah.jpg
>         foo/images/bah.transformed.jpg
>
> since it's easier to delete the transformed images this way.
>
> Good luck =3D)
>
>
> --
>   Yuval Kogman <nothingmuch at woobling.org>
> http://nothingmuch.woobling.org  0xEBD27418
>
>
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jules.scsys.co.uk/pipermail/catalyst/attachments/20061024/a4312=
0b6/attachment.htm


More information about the Catalyst mailing list