[Catalyst] (Beginner) Plugins

Alejandro Imass alejandro.imass at gmail.com
Tue Oct 24 17:27:05 BST 2006


On 10/24/06, Jonathan Rockway <jon at jrock.us> wrote:
>
> You can do all of this with CSS (other than pick the algorithm the
> browser uses to resize the image).  Look at the CSS for HTML Slidy to
> see how this is done:
>
> http://www.w3.org/Talks/Tools/Slidy/


Cool. Thanks for this lead!


The fade to black is a bit less obvious, but all you need to do is
> overlay a PNG with an alpha channel.


MS IE does not support transparency on PNGs and GIF would mess up the fade
badly. This is basically why I opted for server-side processing in order to
overlay the shadow using ImageMagik. But perhaps, if I can handle the
resizing all in the client, I could generate the faded images only once in
the server when the images are first uploaded.


> nothingmuch mentions that you might end up with a lot of images, and
> this is certainly true.  However, if you constrain the aspect ratio, you
> won't have nearly as many files.


Yes, true.


If you don't want to constrain the aspect ratio, then you can still be
> space efficient (or at least use a constant amount of space for an
> infinite number of sizes).  There's an algorithm (whose name I can't
> recall right now) that can generate good-looking images quickly if you
> cache images of size (p,q), (p/2,q/2), (p/4, q/4), etc. (for each aspect
> ratio you desire, of course).
>
> I'll let you know if I find a reference online.  I was planning on
> implementing a catalyst model or controller for storing cached images
> anyway, but haven't gotten around to it yet.



Ok, anything that you can think of helps!  For now, I will stick to the
resizing strictly on the client (CSS, JS, etc.) and generate the faded image
only once on the server. Since the proprtion is fixed, I can generate a
larger proprotional and already cropped image that will scale well with
client side coding. I have a time constraint so I think I will go down this
path. Again, any ideas are very welcome. As I said to Yuval, when we finish
we will release the code to the Catalyst community for evaluation/learning
if anyone would be interested.

Thanks,
Alejandro

Regards,
> Jonathan Rockway
>
>
> --
> package JAPH;use Catalyst qw/-Debug/;($;=3DJAPH)->config(name =3D> do {
> $,.=3Dreverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
> ";$;"]->[$_].q; ;for 1..4;$,=3D~s;^.;;;$,});$;->setup;
>
> _______________________________________________
> 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/3a5d0=
d55/attachment.htm


More information about the Catalyst mailing list