Summary: This fixes Coverity CID1288919 where buffer variable was
being leaked if emile failed to load the image due to corrupt file.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This fixes Coverity CID1288918 where data_start variable was
being leaked if the rectangles did not intersect.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
When reading the head of a file, we may get the error that it is
not a JPEG image (which is normal), so we should not print any ERR.
The JPEG header read function can indeed be called to test whether a
file can be opened by the JPEG loader or not (any file).
Note that JPEG files don't have reliable magic numbers, so we
don't check them, but rely on libjpeg instead.
Fixes T2290
Get rid of warning inside of the jpeg loader that result of it. I do believe
this is not an ABI break on the loader API. If you disagree, please raise your
voice.
The intent of Emile is to be the common layer for serialisation, compression
and ciphering. It will expose the library we currently use internally to an
easier use from the outside (like gcrypt and lz4). It should improve portability.
Instead of pushing JSON, XML and what's not to Eina, I do think that they will
fit better in Emile.
As for the naming of Emile, you will need to be French and say :
"Un quoi ?" "Un serializer !"
Regarding why it is put there in the stack. Right now there is two users of
compression (eet and terminology), two users of cipher library (eet and ecore_con)
and a few handful of user for serialization (eina, eet, efreet, ecore_con, ...).
So the choice was quite simple, it needed to be below Eet. Now it could have been
on top of Eo or integrated into Eina.
One of the use case I am thinking of, is to compress Eo object when a canvas get
hidden/minized. For that it require Eo to use that library and it can't be a higher
level object. And with current implementation of Eo it is perfectly possible to
implement such idea. So not at Eo level.
As for Eina, I am starting to think it is getting to much things in its namespace.
I do believe that infact Eina_Simple_XML and Eina_File should after all have landed
in their own library. That's why I am putting the current logic in a new library.
It is going to expand, I want it to provide an few SAX like parser for JSON,
Eet_Data and protobuf with also an API like Eet_Data to directly feed those value
into a C structure without using a DOM at all. It would also be the right place
to experiment and benchmark for a new Eet_Data format that could be more efficient
to use.
So at the end, and due to how I see things going and being used, I do think it
is better of in its own library.