See the Mailing Lists Page for how to subscribe and unsubscribe.
eprints_tech messages
Please note: this page shows emails that have been sent to the eprints_tech mailing list. Some of these may be spam emails we have failed to filter.
[EP-tech] Reducing thumbnail sizes
From: "Dennis - UT" <dv.eprints AT gmail.com>
Date: Thu, 6 Nov 2008 17:03:54 +0100
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** EPrints community wiki - http://wiki.eprints.org/ I just installed ImageMagick on the server for non-EPrints usage and thought: why not get those thumbnails working as well. I was suprised by the filesize of these thumbnails (actually I wasn't since I already read about it on the EPrints lists before). There's a very simple way to reduce the thumbnail size though, just one small change in /perl_lib/EPrints/Plugin/Convert/ImageMagick/ThumbnailDocuments.pm From: system($convert, "-thumbnail","400x300>", ↵ '-bordercolor', 'rgb(128,128,128)', '-border', '1', $src.'[0]', $dir . '/' . $fn); To: system($convert, "-thumbnail","400x300>", ↵ '-bordercolor', 'rgb(128,128,128)', '-border', '1', $src.'[0]', *'PNG8:'.*$dir . '/' . $fn); The added PNG8: forces it to use 256 color PNG format instead of 16 million colors. I tried it with one PDF, the filesize decreased from 160kb to 20kb without any visual changes (it's only a thumbnail after all). Small code change, huge space savings ;-) Dennis University of TwenteATTACHMENT: message.html!
[index] [prev] [next] [options] [help]




