* Optimize JPEG scaling by downscaling as much as possible during decompression.

This commit is contained in:
Justin Maggard
2010-06-08 17:34:29 +00:00
parent 20bb1db8a7
commit c779eab4de
6 changed files with 33 additions and 19 deletions

View File

@ -558,7 +558,7 @@ GetImageMetadata(const char * path, char * name)
/* We might need to verify that the thumbnail is 160x160 or smaller */
if( ed->size > 12000 )
{
imsrc = image_new_from_jpeg(NULL, 0, (char *)ed->data, ed->size);
imsrc = image_new_from_jpeg(NULL, 0, (char *)ed->data, ed->size, 1);
if( imsrc )
{
if( (imsrc->width <= 160) && (imsrc->height <= 160) )