Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Optimizing an Image Scaling sequence: (1 Item)
   
Optimizing an Image Scaling sequence  
I've been working with the IMG library for a few months and have a functional image scaler.  It can scale most pictures 
(can't do palatized pictures, GIF & palatized PNG).

The rough sequence of operations it uses is:

img_load_file
img_resize_fs
img_write_file

I did this in three parts because I need to load in the file to make some determinations about what to do (image smaller
 than target, unhandleable codec, etc).

My testing has determined that for the average picture, 90% of the total run time is spent in img_load_file.

Timings determined by calling gettimeofday before and after the operation, plus at the start and end of entire code 
block.

So, my question is, does anybody know of a faster way to load pictures into an img_t object?  Our expected file system 
source is a USB stick and we can't pre-copy the file to our RAM drive.