chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] photo album in chicken


From: Ashish Shrestha
Subject: Re: [Chicken-users] photo album in chicken
Date: Sun, 30 Apr 2006 15:02:53 +0100

Hi Peter,

Thanks a lot for feedback. I will definitely have a look at
'phoghorn'. Every different code is something nice to learn.

Thanks for the imlib:destroy. I opted for imlib2 instead of epeg was
because I lazy and didn't really check if they would work well with
larger image. When I read thumbnail and optimized, I thought it might
be optimized just for thumbnails and not larger pictures like 640x480.
In the album I scale images from my digital camera to 640x480 as well
as generate thumbnails. Will have a look at epeg too.

As for Javascript, well I actually wanted to give Lightbox JS a try. :)

Cheers,
Ashish


On 4/30/06, Peter Bex <address@hidden> wrote:
On Sat, Apr 29, 2006 at 09:40:55PM +0100, Ashish Shrestha wrote:
> Hi!
>
> Chicken scripts to generate a HTML gallery. Something I wrote to learn
> scheme so is less scheme than most would like to see. Yes I know I
> have a lot to learn so would love to get feedback on the code.

I must say your code looks great.  I also wrote an image gallery like
this, but mine is messier (mostly because I output strings, not SXML).
You can have a look at mine by fetching the 'phoghorn' egg.

> The album uses Lightbox JS and sample albums are at
> http://axhixh.homelinux.com/ Specially the new albums.

IMHO using javascript for this is overkill.  Of course this is a matter
of preference, I think.

> Would love to hear about the code. What is the correct way to handle
> errors and an issue with memory. I run out of memory and the script
> hangs when I am working with large (5 mega pix or higher) images.

I think you're missing a call to imlib:destroy to free the memory used
by an image.  The imlib2 egg is a pretty direct set of bindings to the
C library and does not hook to the garbage collector for cleaning up
memory automatically.

Also, since you only accept JPEG images, I can recommend changing your
program to use the epeg egg instead of the imlib2 egg.  epeg is just like
imlib, only specialised for JPEG images.  It was written by Rasterman
from the Enlightenment project precisely for this purpose; scaling
many photos to thumbnails for galleries.  Because it less general-purpose
it can be much faster.  I think it's about twice as fast as imlib2.

Regards,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth


_______________________________________________
Chicken-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users








reply via email to

[Prev in Thread] Current Thread [Next in Thread]