I'm using NetPBM to generate my thumbnails, and I was wondering if there is a way to set the compression applied to the thumbnail images? Currently they're all jpegs at about 10-15k. This is quite weighty and consumes a lot of bandwidth. I'd much rather they be 3-7kb each instead. Is there a way to set the compression of NetPBM generated thumbnails?
Thanks :smile:
Posts: 52
Surely this is an important issue with large galleries and small bandwidth limits? Can anyone please help?
Posts: 2
After a quick search in the sources it seems that resize_image in utils.php is the function you're after - it's called by makeThumbnail in classes/AlbumItem.php (and elsewhere probably)
Try editing the source so resize_image takes an optional "quality" fourth argument and update the the pnm calls appropriately.
I'm sure the Gallery authors would be grateful to see your patch :smile:
Not sure I've helped much, just some thoughts off the top of my head.
Ian.
Posts: 7985
You must have a pretty old version of Gallery. Starting in v1.2.6, you can specify the quality for JPEGs on page 2 of the config wizard.
Posts: 52
Doh! You've caught me out there! v1.2.5 :sad:
Looks like I'll have to go ahead with the upgrade I've been putting off! Thanks for your help!