Loading 2 thumbnails with different sizes from same image

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, helmut, xnview

kurka666
Posts: 47
Joined: Thu Mar 10, 2005 11:41 am

Loading 2 thumbnails with different sizes from same image

Post by kurka666 »

Hi

If I need to have two thumbnails with different sizes from the same original, what would be the best way:
a) load the largest thumbnail and then copy+resize into the smallest
b) load thumbnail from file twice, once for each size



Thanks

HEK
User avatar
Ithier
Posts: 47
Joined: Fri Nov 19, 2004 10:50 am
Location: Paris, France

Post by Ithier »

Hi,
It depends if you want quality or speed.
If you want the best quality it is best to use option b (but it is slower as it needs to decompress the file twice), if you want speed the option a is faster.

Another option is to load the file and then make a copy (clone) and then resize both. You will have best quality and it is probably faster than option B because decompressing image is done only once.

You will have to choose between quality and speed and make some test to see what is best for you.

Regards

Ithier
kurka666
Posts: 47
Joined: Thu Mar 10, 2005 11:41 am

Post by kurka666 »

Thank you! I'll make some tests with both option a and b, and also test your suggestion.

I'll post the results for your information.

HEK