Forum Moderators: coopster
This may have been asked before, but can’t find any the posts, so here it goes.
I have a site where people can upload images, and create thumbnails. Problem is using the GD library the thumbnail quality is quite low, and pixilated.
Is there a way to get better quality from the resize? If so using what components and so on? (Would prefer using things that come with the default installation.)
Also, how can a thumbnail be done from a gif image (animated or not) and from swf flash moves?
Message back
Vali
If you are using imagecopyresampled and still are not happy with the results, you may want to take a look at imagemagick [imagemagick.org].
how can a thumbnail be done from a gif image
Same as from a JPEG... just use imagecreatefromgif [php.net] instead of imagecreatefromjpeg [php.net] and output the resampled version using imagegif [php.net] instead of imagejpeg [php.net].
From [us2.php.net...]
Note: GIF support was removed from the GD library in Version 1.6, and added back in Version 2.0.28. This function is not available between these versions.
I have the latest GD library, so think the GIF is in there.
I'm using imagecopyresized right now, I'll try the imagecopyresampled. Only problem I found about it is that it can take a while to do... (2.2 seconds from the manual) so I can't really have it wait that long.
Any ideas of imagemagick is faster then that?
Vali
If you have people uploading pictures of that size, the upload itself is probably taking quite a few seconds already, so the extra couple at the end for processing shouldn't matter too much.