Supplied here is:
- Callbacks implementation;
- Full implemetation of callbacks for FIF_TIFF, FIF_JPEG Loading and FreeImage_Rotate utility function.
- Helper class (wraps the callback struct) for easy adding callbacks to any loading or utility function inside FreeImage.
Mihail Naydenov
2010-12-07
Callbacks support + simple test
Mihail Naydenov
2010-12-07
For more detailed info:
https://sourceforge.net/projects/freeimage/forums/forum/36111/topic/4004822
Mihail Naydenov
2010-12-07
Forgot to mention the Rotate function also has improved performance because the use of AssignPixel instead of memcpy and for loops.
The gain is considerable mainly for big, higher depth images (up to 40%).
Mihail Naydenov
2010-12-17
Adds TARGA support, Save to JPEG, TIFF, modules enum
Mihail Naydenov
2010-12-17
Added modules enumeration. (In future it can, together with callbacks, be used for better error report)
Added Load and Save callback to TGA, Save callback for JPEG and TIFF.
(As it is evident form the code, it is extremely easy thing to do.)
For now I put development on hold, until some feedback is given.
Mihail Naydenov
2010-12-17
A quick note:
CallbackHelper::reportStepProgress()
should check for _cb first, not after the % check, otherwise if _gran == 0 it will crash.
Mihail Naydenov
2011-01-02
Another quick note after using the patch for a while.
The loading functions is probably better to return NULL instead of partially loaded dib. There is nothing wrong in current impl, and is a bit easier, but in the real world it is hard to track if the dib returned is a result of loading or cancellation.
It is not impossible to workaround this, but, considering the dib will be discarded in 99.99% of the cases, it is better and simpler to just return null (we need to unload first of course).
Mihail Naydenov
2011-01-02
Add patch, implementing the last two comments issues.
Mihail Naydenov
2011-01-02
All previous + fixed issues from comments
Mihail Naydenov
2011-01-07
fix dib=NULL return; for rle cancel