Commit Graph

51 Commits

Author SHA1 Message Date
Vincent Torri f7c560c311 replace hton and ntoh family functions with ones defined in eina
Summary: This fixes especially the execution of edje_cc on Windows

Test Plan: execution of edje_cc

Reviewers: cedric, raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7834
2019-02-01 14:25:35 +00:00
Vincent Torri 41f7ae6e49 emile - fix windows build
use evil and fix libjpeg boolean re-def.
2018-10-31 14:12:44 +00:00
Hermet Park 268d3fcef5 emile image: close file properly.
@fix
2018-07-18 14:26:16 +09:00
Subodh Kumar c5e3196731 emile: comparing less than zero with unsigned interger.
Summary:
Unsigned integer should not be compared to less than zero.
@fix

Reviewers: cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5270

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-09 16:38:28 -07:00
jiin.moon d23aca3c8e emile: unmap the memory for image file after decode.
Summary:
In case of emile, unmap the memory of the image file when the image file is closing.
But closing of image file happen when the image is flushed from the cache, so the
mapped memory of image file remain for long period of time with no benefit (If it is
in cache, it won't get decoded again). So I think we don't need to keep the mapped
memory of image file.

Test Plan: self

Reviewers: cedric, jpeg, jypark

Reviewed By: cedric

Differential Revision: https://phab.enlightenment.org/D5210

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-09-27 11:51:50 -07:00
Vincent Torri 0cdd501246 EFL For WIN32: Replace HAVE_EVIL define with _WIN32 2017-09-22 05:06:10 -05:00
Cedric BAIL 7afbe91ca5 emile: fallthrough is legal here as we handle fallback case when caller doesn't know about GRY8. 2017-06-05 12:07:57 -07:00
Jaeun Choi 53e31eeede emile_image: add error handling code for ifd_offset value
Signed-off-by: JEONGHYUN YUN <jh0506.yun@samsung.com>
2017-04-06 15:34:53 +09:00
Cedric BAIL 5420ebaf32 emile: rename emile_image_register to emile_image_callback_set.
This fix ABI report according to discussion on the mailing list.
2017-02-27 15:05:35 -08:00
Cedric BAIL 0ca1d0eef2 emile: refactor color convertion/copy logic in jpeg data decoder. 2016-12-15 16:45:10 -08:00
Cedric BAIL e12d59e216 emile: reduce the amount of clobbered variable. 2016-12-15 11:17:34 -08:00
Sungtaek Hong 44716502fc emile_image: fix possible segmentation fault in AGRY88
Summary:
 - ptrag is set NULL and is allocated only when prop is rotated.
   but *ptrag = 0xFF00 | ptr[0]; without checking rotation.

Reviewers: jpeg, cedric, Hermet

Reviewed By: Hermet

Subscribers: conr2d

Differential Revision: https://phab.enlightenment.org/D4463
2016-12-07 13:42:46 +09:00
Cedric BAIL c8fef4a556 emile: add infrastructure for callback to request what to do with image.
First use of this infrastructure is to make JPEG decoding interruptible.
2016-12-06 16:34:40 -08:00
jiin.moon c54bd44790 emile: fix jpeg loader broken with orientation
Summary:
After applying a patch regarding region, side-effect detected.

Fixes T4390

Test Plan: make check

Reviewers: jpeg, cedric, jypark

Maniphest Tasks: T4390

Differential Revision: https://phab.enlightenment.org/D4245
2016-08-19 15:19:08 +09:00
Jean-Philippe Andre 0193e40d8c evas: Fix region test in jpeg load with region + zoom
The previous commit exposed an issue with the region test
does not take into account the scale down factor.

Not a @fix in itself, as it depends on the previous patch.
2016-08-17 17:28:53 +09:00
jiin.moon fecbcf8a90 emile: region_set does not working in jpeg loader if scale_down has set
Summary:
If both region and scale_down has set, ERR would be returned by loader of jpeg.

@fix

Test Plan: sample code

Reviewers: raster, jypark, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4200
2016-08-17 17:28:53 +09:00
junsu choi 260377a376 emile: fix build warning of Emile_Image.
Summary: initialized structure 'opts_region' for uninitialized build warning

Test Plan: N/A

Reviewers: raster, woohyun, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3993

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-05-31 14:59:26 -07:00
Jean-Philippe Andre cc5cccc511 Eet: fix decoding of embedded ETC images
Typos, lack of NULL check, excessive sizeof(type) not matching
the object type, no border set, etc... This all lead to a crash
and then no render (with an error message and then without...).

This also simplifies the implicit loading of ETC1 as ETC2 when
supported by the driver.

@fix
2015-10-29 17:58:34 +09:00
Jean-Philippe Andre e5dbc21119 Emile: Allow load of ETC images if region = whole image
@fix
2015-10-29 17:58:34 +09:00
Cedric BAIL 508143efba emile: prevent segv when rotation is asked and there is no opts provided.
Thanks Vivek for pointing the problem.

@fix
2015-10-22 11:31:06 -07:00
jiin.moon 95467e5707 emile: fix can not check ifd offset of jpeg in MM(little endian) format
IFD offset is 4 byte.
But just one byte is checked for it in previous patch.

Reviewers: Hermet, jypark, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3053

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-21 23:44:52 +02:00
ChunEon Park e656dde568 emile jpeg: more descriptive comment. 2015-08-29 00:59:06 +09:00
jiin.moon 1073774d8e emile: fix can not parsing the EXIF info of the jpeg file which has IFD offset
Summary:
IFD offset of jpeg is not fixed.
But emile support only 0x8 on now

Reviewers: jypark, cedric, Hermet

Reviewed By: Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3000
2015-08-29 00:47:43 +09:00
Stefan Schmidt ef81feff16 emile: Init ptrag as it might get used uninitialized if not
lib/emile/emile_image.c:2099:49: warning: 'ptrag' may be used uninitialized in this function [-Wmaybe-uninitialized]
2015-06-08 17:09:38 +02:00
jiin.moon 63a12d7d26 emile: fix region load for jpeg image with orientation different set.
Summary:
If you try to load the jpeg image with an orientation mode defined
using elm_photocam, you can see the broken image(in canse of 90 degree)
or even segmentation fault can happen (in case of 180,270 degree)

@fix

Test Plan: photocam menu on elementary_test

Reviewers: Hermet, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2593

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-03 13:46:44 +02:00
Cedric BAIL 97e24931e3 emile: correctly free buffer allocated for compressed image.
CID 1295688
2015-04-26 09:38:13 +02:00
Cedric BAIL eaf9822094 emile: fix memory leak.
CID 1288918 & 1288919
2015-04-25 20:00:44 +02:00
Cedric BAIL 888057f0bc emile: fix memory leak.
CID 1288924 & 1288923
2015-04-25 19:27:20 +02:00
Cedric BAIL 5d59a403cd emile: fix typo. 2015-04-25 19:08:36 +02:00
Cedric BAIL 5010daa31e emile: opts can be NULL, so checking it before using it.
CID 1288927
2015-04-25 18:58:30 +02:00
Cedric BAIL 1c597b4373 emile: check that we actually do have option before using them.
CID 1288929
2015-04-25 18:52:22 +02:00
Cedric BAIL bb963f274b emile: fix support of AGRY88.
CID 1288931
2015-04-25 18:26:58 +02:00
Chris Michael 820eca333e emile: Fix resource leak
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>
2015-04-20 13:13:55 -04:00
Chris Michael 843d4705d8 emile: Fix resource leak
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>
2015-04-20 13:06:41 -04:00
Jean-Philippe Andre 755b290404 Emile: Reduce ERR logs on invalid JPEG images
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
2015-04-15 10:49:43 +09:00
Jean-Philippe Andre ced11e92a8 Emile image: Fix decoding of ETC1+Alpha images
This bug is probably a copy&paste issue when writing emile.
2015-04-14 16:37:12 +09:00
Jean-Philippe Andre 18d5e04bb5 Emile image: Fix TGV (ETC1,2) loader
The error was not reset to NONE even in case of success.
2015-04-07 14:40:00 +09:00
Cedric BAIL 671bd817bf emile: meaningful initialization of some pointers. 2015-03-23 22:04:15 +01:00
jiin.moon 34d92d4d1e emile: Remove unnecessary check in _emile_jpeg_head function
Summary: Already checked it by "else if ((opts->w > 0) && (opts->h > 0))"

Reviewers: cedric, Hermet

Reviewed By: Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2199
2015-03-20 14:02:58 +09:00
Cedric BAIL f875f759ca emile: fix coding style with ecrustify. 2015-03-17 09:58:21 +01:00
Cedric BAIL 5412be48e1 emile: remove use of deprecated eina binbuf function. 2015-03-17 09:58:21 +01:00
Cedric BAIL a446624f5f emile: make sure given boolean are really boolean. 2015-03-17 09:58:20 +01:00
Cedric BAIL 90d8932a03 emile: remove binbuf from emile compression functions. 2015-03-17 09:58:20 +01:00
Cedric BAIL 75cd6d3628 emile: use Eina_Log for Jpeg error message. 2015-03-17 09:58:20 +01:00
Vincent Torri 26708e0818 emile: fix array count 2015-03-17 09:58:20 +01:00
Cedric BAIL 065f87bd15 emile: cleanup comments and internal functions name. 2015-03-17 09:58:20 +01:00
Cedric BAIL a88f0074d7 emile: handle AGRY88 for JPEG image. 2015-03-17 09:58:19 +01:00
Cedric BAIL bafe5e9a74 emile: decode GRAY JPEG as GRY8. 2015-03-17 09:58:19 +01:00
Cedric BAIL 1a8384cd3c emile: simplify error handling for jpeg data decoding. 2015-03-17 09:58:18 +01:00
Cedric BAIL 4ca8bfd15c emile: add JPEG support. 2015-03-17 09:58:18 +01:00