ethumb: fix setup related API problem

Summary:
setup related API was not working at all due to below problems

1. dbus type signature is wrong. it's array of dictionary not array of struct
2. since quality value was assigned to compress value, there was a problem during saving png image (out of bound)
3. orientation_set API was not working except NONE and ORIGINAL

@fix

Test Plan: make thumbnail by using elm_thumb_add -> orientation set to 90 CCW -> check whether image is rotated properly or not

Reviewers: raster, cedric

CC: seoz, cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
This commit is contained in:
wonguk.jeong 2014-07-07 19:10:58 +02:00 committed by Cedric BAIL
parent 3e79b47e80
commit f803ba27b7
3 changed files with 4 additions and 2 deletions

View File

@ -1638,7 +1638,7 @@ _ethumb_dbus_ethumb_setup_cb(const Eldbus_Service_Interface *iface, const Eldbus
request->id = -1;
r = EINA_TRUE;
while (eldbus_message_iter_get_and_next(array, 'r', &data) && r)
while (eldbus_message_iter_get_and_next(array, 'e', &data) && r)
{
if (!_ethumb_dbus_ethumb_setup_parse_element(eobject, data, request))
r = EINA_FALSE;

View File

@ -1611,6 +1611,8 @@ _ethumb_image_load(Ethumb *e)
}
#endif
}
else
orientation = e->orientation;
if (orientation != ETHUMB_THUMB_ORIENT_NONE)
_ethumb_image_orient(e, orientation);

View File

@ -817,7 +817,7 @@ ethumb_client_ethumb_setup(Ethumb_Client *client)
_setup_iterator_close(array, entry, variant);
variant = _setup_iterator_open(array, &entry, "compress", "i");
compress = ethumb_thumb_quality_get(e);
compress = ethumb_thumb_compress_get(e);
eldbus_message_iter_arguments_append(variant, "i", compress);
_setup_iterator_close(array, entry, variant);