[mir-coders] Re: [imc-uk-tech] automagic resize
john duda
john at manifestor.org
Fri Dec 24 09:33:14 PST 2004
it seems to me that this would be pretty easy to do:
if you look at:
source/mircoders/media/MediaHandlerImagesExtern.java
all the thumbnail generating code is right there...
all you would have to do is write a MediaHandler which extends this
class, overriding the produce method so that it also scales down the
image by a different ratio and writes that say to images/scaled, and
make the appropriate changes in the templates, adding links to the
original version.
you'll also see in there that you get entity attributes img_height and
img_width set at produce time which would allow you to include the
full size with the link to the full size version.
doing the linking of scaled pages to each other gallery style might be
harder....
john
On Fri, Dec 24, 2004 at 05:20:24PM +0000, Chris wrote:
> Hi
>
> On Wed 22-Dec-2004 at 02:54:18PM -0800,
> mesa at cascadiarising.org wrote:
> >
> > > As for your wish, something along those lines is in my
> > > head (like multiple scaled down versions of the same
> > > image, instead of just the thumbnail), but I really
> > > don't know when I'll have the time to add it.
>
> That is a shame, it would be a very nice feature :-)
>
> Ideally I'd like to have thumbnails on the article page,
> eg like this:
>
> http://images.yorkagainstthewar.org.uk/2003/20030315/
>
> And have each thumbnail link to a web page with an
> embedded scaled image (I don't really see the need for
> more than one scaled image) eg:
>
> http://images.yorkagainstthewar.org.uk/2003/20030315/0315_0010_Sm.jpg.6.html
>
> And these scaled image pages to have next and previous
> links (<< and >> on the page above) so that it is easy for
> someone to browse all the scaled images one after another.
> And also have the scaled image being a link to the raw
> full size uploaded image.
>
> > I do like the idea of showing the file size with the
> > thumbnail image, is there a variable we can access to do
> > that?
>
> This would be very easy to do with SSI without changing
> anything but the templates:
>
> <!--#config sizefmt="abbrev"-->
> <!--#fsize file="/foo/bar/image.jpg"-->
>
> More info:
>
> http://httpd.apache.org/docs-2.0/howto/ssi.html
>
> Chris
> _______________________________________________
> mir-coders mailing list
> mir-coders at lists.indymedia.org
> http://lists.indymedia.org/mailman/listinfo/mir-coders
--
this is where my public key can be found:
gpg --keyserver pgp.mit.edu --recv-keys 03817826
Key fingerprint = 6C11 8D70 2ADE EFA9 498D 72CB 77EA 391A 0381 7826
More information about the mir-coders
mailing list