FreeImage FIF_LOAD_NOPIXELS working?
BlitzMax Forums/Brucey's Modules/FreeImage FIF_LOAD_NOPIXELS working?
| ||
I was very happy to see FreeImage updated. I have a little app that reads and renames photos based on their exif data, and was hoping to speed it up by using the FIF_LOAD_NOPIXELS flag. I'm doing Local img:TFreeImage = LoadFreeImage(s,$8000)but it does not seem to result in any speedup. RAW files (in my case mostly Samsung .SRW) read very slowly because of their size, but a speedup for jpg would be great too. Also I don't seem to get any effect from using JPEG_FAST or RAW_PREVIEW Am I using the right value for the flag, or is there something else I can try? |
| ||
Well, the documentation says FIF_LOAD_NOPIXELS will read header/meta data for supported images. There are some helper functions I will add to give some more useful information. The FreeImage functions, according to the docs are : FreeImage_FIFSupportsNoPixels and FreeImage_HasPixels May be useful in your case, at least to tell you if it is indeed able to load only header/meta data. |
| ||
I've added some new functionality. It's in SVN for now. I also added a new test (9), which provides an example of using the FIF_LOAD_NOPIXELS on a raw file. (A NEF file that happens to be in the tests area already). It does seem to work on supported files. |
| ||
It's working perfectly now. My app is blazingly fast compered to the old speed. Works perfectly with my Samsung RAWs too. I may have been doing something wrong in the first test. *Many thanks*, because I use this on all my photos to keep them organized. "SAM_4026.srw" becomes "2012.12.24-22.34.55-SAM_4026.srw" and then it's easy, -in the future and across filesystems to identify photos by their date and time. Last edited 2013 |