[3.0]Fix for libjpeg API changes 84/62384/3 accepted/tizen/common/20160323.184854 accepted/tizen/ivi/20160323.140643 accepted/tizen/mobile/20160323.135032 accepted/tizen/tv/20160323.135447 accepted/tizen/wearable/20160323.135146 submit/tizen/20160323.065919
authorminho.sun <minho.sun@samsung.com>
Wed, 24 Feb 2016 02:24:43 +0000 (11:24 +0900)
committerminho.sun <minho.sun@samsung.com>
Wed, 23 Mar 2016 05:13:32 +0000 (14:13 +0900)
commite8622e5a318a20038f26590fb481a6d9555937b7
tree94dade171fcf3df6da8dd5291ea75d4d8e232526
parentffa5e92a476c2a67492f0f1a82ee6a5b47254fd5
[3.0]Fix for libjpeg API changes

TurboJPEG API functions will now return an error code if a warning is triggered in the underlying libjpeg API.

For instance, if a JPEG file is corrupt, the TurboJPEG decompression functions will attempt to decompress as much of the image as possible, but those functions will now return -1 to indicate that the decompression was not entirely successful.

For this reason, we need to distinguish return of tjGetErrorStr() is warning or error.

If the return string has 'Corrupt JPEG data' prefix, it means warning.
Then, do not return false.

Change-Id: Ib542f2365c0e35c14187e3daa7e32008296c26bb
platform-abstractions/tizen/image-loaders/loader-jpeg-turbo.cpp