png: handle 9-patch ends with stretch 15/249115/2
authorShinwoo Kim <cinoo.kim@samsung.com>
Mon, 7 Dec 2020 07:52:54 +0000 (16:52 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Mon, 7 Dec 2020 07:56:05 +0000 (16:56 +0900)
commitd4db1bb6015720efc77097a083d83c0d1df73824
tree01bf1ad5a38c97cbc9506418e93d543b49711ee8
parent81166b53ea3576b05730c4087aded4d69dc607d1
png: handle 9-patch ends with stretch

Summary:
The strech region has paired information; total and strechable.
Refer to function _strech_region_load retrieving strech region info.

But if 9-patch information line ends with strechable,
png did not push the strechable information.
And it leads to devide by zero.

This patch is adding strechable info to the strech region,
if 9-patch information ends with strechable.

Test Plan:
[Code]
{F4219278}
{F4219280}

[Test]
ECORE_EVAS_ENGINE=opengl_x11 ./evas-image-9patch ./end_with_strech.9.png

Reviewers: Hermet, jsuya, herb, cedric

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

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

Change-Id: I6242b2686358c28e2efbb152d40e59a898ee435d
src/modules/evas/image_loaders/png/evas_image_load_png.c