diff options
author | Vitalii Vorobiov <vi.vorobiov@samsung.com> | 2015-06-25 16:11:37 +0200 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2015-06-25 17:24:08 +0200 |
commit | 4fe4ee851673817043773d66d2b1552b9c0141d1 (patch) | |
tree | 1745aba5055bc848c2bf21706142a5eb121fadb8 | |
parent | b116f8a3614150b550a655215a925414639a55de (diff) | |
download | elementary-4fe4ee851673817043773d66d2b1552b9c0141d1.tar.gz |
elm_colorselector: pixel-picker accuracy fix
Summary:
Looking at the base array of pixels,
the real middle of taken picture
is actually number 8 from array of 17 pixels (which starts from 0).
@fix
Reviewers: reutskiy.v.v, raster, NikaWhite, cedric
Reviewed By: NikaWhite, cedric
Differential Revision: https://phab.enlightenment.org/D2749
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r-- | src/lib/elm_colorselector.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/elm_colorselector.c b/src/lib/elm_colorselector.c index 20915f096..5dc9f17af 100644 --- a/src/lib/elm_colorselector.c +++ b/src/lib/elm_colorselector.c @@ -576,9 +576,9 @@ _mouse_up_cb(void *data, int type EINA_UNUSED, void *event EINA_UNUSED) ELM_SAFE_FREE(sd->grab.mouse_up, ecore_event_handler_del); pixels = evas_object_image_data_get(sd->picker_display, EINA_FALSE); - r = (pixels[17 * 9 + 9] >> 16) & 0xFF; - g = (pixels[17 * 9 + 9] >> 8) & 0xFF; - b = pixels[17 * 9 + 9] & 0xFF; + r = (pixels[17 * 8 + 8] >> 16) & 0xFF; + g = (pixels[17 * 8 + 8] >> 8) & 0xFF; + b = pixels[17 * 8 + 8] & 0xFF; _colors_set(o, r, g, b, 0xFF); evas_object_smart_callback_call(o, SIG_CHANGED_USER, NULL); |