Setting up pixel array data for Evas Image Object

454 views Asked by At

This question is about use of evas_object_image_data_set function.
Say, I have some pixel array in RGBA format. I make a transformation on it to become ARGB, suitable for Evas Image Object.
Next thing I create a window with elm_win_add.
Then I create image object with evas_object_image_add(evas_object_evas_get(window)).
After that I call to evas_object_image_fill_set, then evas_object_image_size_set.
Then I call evas_object_image_data_set and finally I call evas_object_image_data_update_add with approriate region for my image.
After all this done I see nothing but black box. Am I doing something wrong?

P.S.: using efl version 1.7.7

1

There are 1 answers

1
kuuko On BEST ANSWER
  1. Setup the image object as described in the question.
  2. Get a void pointer to the raw image data with evas_object_image_data_get, with EINA_TRUE in argument for_writing.
  3. Modify the data as needed.
  4. Call evas_object_image_data_set with the void pointer as argument.