Hi Gustavo,
   Thanks for your information on evas_image_loader when pixels are being 
scanned and sparse_alpha flag is being set.
But this common function "evas_common_image_set_alpha_sparse" is being called 
only for loaders of svg and tiff files, not for other formats.

Besides in this function, we are already scanning image data texels in order to 
determine alpha_sparse. So if we do similar stuff for determining opacity of 
image in some other function, then scanning will happen twice for any image 
while loading which will
affect the performance(load time).
Then the option we are left with is to set the apha flag here itself in this 
function while scanning the image data and call this function from loaders for 
all image formats.
Whether this option in your opinion is good as this function name suggests for 
setting the alpha_sparse, not the alpha value.

And this change will affect the image loading performance every time it gets 
loaded where as if we do it in edje_cc code, then this will affect only the eet 
creation flow using edje_cc, not the normal operation.

Others including Raster has suggested for scanning the image data in edje_cc 
saving flow which in my opinion should be good as it will not affect the normal 
flow performance.

I would like to know whether this should be default behavior of edje_cc or 
shall I add it as an option to the compiler. If it should be an option, then 
what option flag do you suggest!
I think -o should be good.

Please let me know your opinion on this.
Thank You.
Regards,
Rajeev

------- Original Message -------
Sender : Gustavo Sverzut Barbieri <barbi...@profusion.mobi>
Date : Fri, 13 Apr 2012 11:24:29 -0300
Title : Re: [E-devel] [PATCH][EET] Patch to remove the alpha from image header 
while saving if the alpha is set to 1 but the image is fully opaque

On 04/13/12 22:55, Gustavo Sverzut Barbieri  wrote:
> On Fri, 13 Apr 2012 13:54:50 +0000 (GMT) Rajeev Ranjan
> said:
>
> Hi Rajeev,

> As far as I remember there is already an alpha analysis being done by
> Evas image loaders to set "sparse alpha" flag. I believe the same
> analysis can be used to detect no-alpha situation.

> If so, doing in Evas is a best fit as it will work with images loaded
> from internet or disk.

> BR,
> -- Gustavo
>

>> Hi,
>>     Attached to the mail is a patch to set the alpha information for an image
>> header to 0 with alpha present but all the texels being opaque.
>>
>> The objective of this patch is to avoid the alpha blending for the images
>> which don't use alpha but while creating, the alpha channel has been added by
>> the creator. In order to do so, the image individual texels are scanned to
>> find if alpha is used in the image for any texel and the image is fully
>> opaque, while saving the alpha is set to 0. If the alpha information in
>> image header is set to 0 already, then this stage is skipped.
>>
>> This implementation can be done at either eet level or edje level. Currently
>> in this patch it has been done in eet.
>>
>> If required, it can be implemented in edje_cc itself rather than in eet image
>> data saving. One more option can be to make this scanning optional which can
>> be done in edje_cc through an option provided this is implementd at edje_cc
>> level rather than at eet level.
>>
>> Change Description:
>>
>>     While writing the image to eet file, the image data is scanned to find 
>> out
>> whether the alpha value in header is set to 1 and is not being used in the
>> image. If that is the case while writing, we set the alpha to 0 to avoid
>> blending for such images in the graphics pipeline.
>>
>> This will be an optimization for rendering once the image is loaded from eet
>> file as alpha blending can be avoided for such images.
>>
>> Signed-Off-By: RAJEEV RANJAN
>>
>> Please review the same and provide your feedbacks.
>> Thank You.
>> Regards,
>> Rajeev
>
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to