From: <bma...@ma...> - 2002-11-06 23:23:00
|
I want to take a small section of the screen and copy it into an evas object. Using imlib, i can get the image data i want (and if i save it out i can see that it is correct), so I figured doing the following would work: evas_object_image_data_set(obj, imlib_get_image_data_for_reading_only()); when i do this (with the image format in argb, rgba, png, whatever), the evas object shows no contents. (if i set a file, it does, so the object is in the right place and shown and all.) Is there a better way to do this? or is this the correct way and i'm just doing something wrong somewhere? -- brian |
From: Carsten H. (T. R. <ra...@ra...> - 2002-11-07 05:01:31
|
On Wed, 6 Nov 2002 16:20:30 -0600 bma...@ma... babbled: > I want to take a small section of the screen and copy it into an evas object. > Using imlib, i can get the image data i want (and if i save it out i can see > that it is correct), so I figured doing the following would work: > > evas_object_image_data_set(obj, imlib_get_image_data_for_reading_only()); > > when i do this (with the image format in argb, rgba, png, whatever), the evas > object shows no contents. (if i set a file, it does, so the object is in the > right place and shown and all.) > > Is there a better way to do this? or is this the correct way and i'm just > doing something wrong somewhere? have you done: evas_object_image_size_set() to set the pixel array dimensions first? have you evas_object_image_alpha_set() to flag the alpha channel off (0)? :) -- --------------- Codito, ergo sum - "I code, therefore I am" -------------------- The Rasterman (Carsten Haitzler) ra...@ra... ra...@de... Mobile Phone: +61 (0)413 451 899 Home Phone: 02 9698 8615 |
From: Carsten H. (T. R. <ra...@ra...> - 2002-11-07 07:46:36
|
On Wed, 6 Nov 2002 16:20:30 -0600 bma...@ma... babbled: > I want to take a small section of the screen and copy it into an evas object. > Using imlib, i can get the image data i want (and if i save it out i can see > that it is correct), so I figured doing the following would work: > > evas_object_image_data_set(obj, imlib_get_image_data_for_reading_only()); > > when i do this (with the image format in argb, rgba, png, whatever), the evas > object shows no contents. (if i set a file, it does, so the object is in the > right place and shown and all.) > > Is there a better way to do this? or is this the correct way and i'm just > doing something wrong somewhere? have you done: evas_object_image_size_set() to set the pixel array dimensions first? have you evas_object_image_alpha_set() to flag the alpha channel off (0)? :) -- --------------- Codito, ergo sum - "I code, therefore I am" -------------------- The Rasterman (Carsten Haitzler) ra...@ra... ra...@de... Mobile Phone: +61 (0)413 451 899 Home Phone: 02 9698 8615 |
From: Carsten H. (T. R. <ra...@ra...> - 2003-01-17 00:23:38
|
On Wed, 6 Nov 2002 16:20:30 -0600 bma...@ma... babbled: > I want to take a small section of the screen and copy it into an evas object. > Using imlib, i can get the image data i want (and if i save it out i can see > that it is correct), so I figured doing the following would work: > > evas_object_image_data_set(obj, imlib_get_image_data_for_reading_only()); > > when i do this (with the image format in argb, rgba, png, whatever), the evas > object shows no contents. (if i set a file, it does, so the object is in the > right place and shown and all.) > > Is there a better way to do this? or is this the correct way and i'm just > doing something wrong somewhere? did you set the image size first? evas_object_image_size_set(obj, pixel_width, pixel_height); :) (NB - if you set the image data and not COPIED data you MUST keep the image data round for as long as the evas object is in existence (that is until you get the callback for the object free) you can avoid having to keep the image around with evas_object_image_data_copy_set(object, imlib_get_image_data_for_reading_only()); :-) -- --------------- Codito, ergo sum - "I code, therefore I am" -------------------- The Rasterman (Carsten Haitzler) ra...@ra... ra...@de... Mobile Phone: +61 (0)413 451 899 Home Phone: 02 9698 8615 |
From: <bma...@ma...> - 2003-01-17 20:15:58
|
* Carsten Haitzler <ra...@ra...> [2003-01-17 11:12:55 +1100]: > On Wed, 6 Nov 2002 16:20:30 -0600 bma...@ma... babbled: > > > I want to take a small section of the screen and copy it into an evas object. > > Using imlib, i can get the image data i want (and if i save it out i can see > > that it is correct), so I figured doing the following would work: > > > > evas_object_image_data_set(obj, imlib_get_image_data_for_reading_only()); > > > > when i do this (with the image format in argb, rgba, png, whatever), the evas > > object shows no contents. (if i set a file, it does, so the object is in the > > right place and shown and all.) > > > > Is there a better way to do this? or is this the correct way and i'm just > > doing something wrong somewhere? > > did you set the image size first? > > evas_object_image_size_set(obj, pixel_width, pixel_height); yep, that was the problem i had back in november :) i guess this will be a good reminder for anyone else doing similar stuff. > > :) > (NB - if you set the image data and not COPIED data you MUST keep the image data > round for as long as the evas object is in existence (that is until you get the > callback for the object free) > > you can avoid having to keep the image around with > evas_object_image_data_copy_set(object, > imlib_get_image_data_for_reading_only()); yeah, i ended up doing that also (in elicit). thanks again though, -- brian > > :-) > > -- > --------------- Codito, ergo sum - "I code, therefore I am" -------------------- > The Rasterman (Carsten Haitzler) ra...@ra... > ra...@de... > Mobile Phone: +61 (0)413 451 899 Home Phone: 02 9698 8615 |
From: Ben M. <mon...@us...> - 2003-01-17 02:32:12
|
On Thu, 2002-11-07 at 08:20, bma...@ma... wrote: > I want to take a small section of the screen and copy it into an evas object. > Using imlib, i can get the image data i want (and if i save it out i can see that it is correct), so I figured doing the following would work: > > evas_object_image_data_set(obj, imlib_get_image_data_for_reading_only()); > > when i do this (with the image format in argb, rgba, png, whatever), the evas object shows no contents. (if i set a file, it does, so the object is in the right place and shown and all.) > > Is there a better way to do this? or is this the correct way and i'm just doing something wrong somewhere? Something like this maybe: evas_object_image_size_set( eo, w, h ); if( copydata ) evas_object_image_data_copy_set( eo, (int*)(rgbadata) ); else evas_object_image_data_set( eo, (int*)(rgbadata) ); evas_object_image_fill_set( eo, 0, 0, w, h ); > > -- > brian > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: Thawte.com > Understand how to protect your customers personal information by implementing > SSL on your Apache Web Server. Click here to get our FREE Thawte Apache > Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en > _______________________________________________ > enlightenment-devel mailing list > enl...@li... > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Ben Martin <mon...@us...> |