On Sun, 22 Sep 2002 22:31:23 +0200 Olivier <olivier lx student wau nl> wrote:
Hi all, in the Bluefish editor I have the ability for users to create (and save) thumbnails. Mostly I use png images for thumbnails (users can also select jpeg). If I create a thumbnail manually I do some color reduction. If I go from RGB to lets say 64 colors I can reduce the size by 60%. Since the target is a website size is important. But if I save using gdk_pixbuf I can only save all RGB colors, resulting in larger images. I can also not specify the compression factor for the png compression (I would like to set that very high). How can I improve this and generate smaller images?
Use g_spawn_[a]sync to do the conversion with the convert(1) program from the ImageMagick suite. You can then use the -quality flag to set the compression level, and the -scale flag to scale the image. This does add a dependancy to your program, but ImageMagick is very common. Roland -- R.F. Smith /"\ ASCII Ribbon Campaign r s m i t h @ x s 4 a l l . n l \ / No HTML/RTF in email http://www.xs4all.nl/~rsmith/ X No Word docs in email / \ Respect for open standards
Attachment:
pgpH3jNzw0wSS.pgp
Description: PGP signature