done. thank you!

------------------------------------
-Regards, Hermet-

-----Original Message-----
From: "Cedric BAIL"<[email protected]> 
To: "Enlightenment developer list"<[email protected]>; 
Cc: 
Sent: 2014-06-26 (목) 16:46:20
Subject: Re: [E-devel] [EGIT] [core/efl] efl-1.10 01/01: evas/gl - fix to 
render grayscale with transparency format in gl backened.

Ah, GRY8 can have a colorkey to have one transparent color, didn't
know about that. Well, the easy fix here is to put an if in front of
prop->cspaces = cspace_grey; to check if alpha is not set. I do think
indeed it is not worth it to try to convert it to AGRY88 for now. If
it ever happen to be useful to someone, we can still optimize that
later. Please do the fix in the PNG loader !

Regards,
 Cedric

On Thu, Jun 26, 2014 at 6:52 AM, ChunEon Park <hermet>@naver.com> wrote:
> http://www.libpng.org/pub/png/book/chapter08.html
> see 8.5.4
>
> There describes the png format that grayscale without alpha channel but 
> support transparency.
> so we got a GRY with ALPHA (not AGRY) in the png loader.
>
> This format is unusual so i don't think gl need to support GRY + Alpha
> but we do draw this by simply converting to argb.
>
> Well...  I'm not sure this is valualble  for this unusual format
> if we convert from GRY + alpha to AGRY88.
>
> i uploaded the test image file to "devs/hermet/misc/a.png"
>
> ------------------------------------
> -Regards, Hermet-
>
> -----Original Message-----
> From: "Jean-Philippe André"<jpeg>@videolan.org>
> To: "Enlightenment developer 
> list"<enlightenment-devel>@lists.sourceforge.net>;
> Cc:
> Sent: 2014-06-26 (목) 10:42:23
> Subject: Re: [E-devel] [EGIT] [core/efl] efl-1.10 01/01: evas/gl - fix to 
> render grayscale with transparency format in gl backened.
>
> Hey Cedric,
>
>
> On Wed, Jun 25, 2014 at 11:44 PM, Cedric BAIL <cedric.bail>@free.fr> wrote:
>
>> On Wed, Jun 25, 2014 at 2:57 PM, ChunEon Park <hermet>@hermet.pe.kr> wrote:
>> > hermet pushed a commit to branch efl-1.10.
>> >
>> >
>> http://git.enlightenment.org/core/efl.git/commit/?id=b2d99524b7fd4e6ef0933bc64443d96f25098eec
>> >
>> > commit b2d99524b7fd4e6ef0933bc64443d96f25098eec
>> > Author: ChunEon Park <hermet>@hermet.pe.kr>
>> > Date:   Wed Jun 25 21:46:49 2014 +0900
>> >
>> >     evas/gl - fix to render grayscale with transparency format in gl
>> backened.
>> >
>> >     In case of png, grayscale with transparency format (transparency
>> doesn't mean the png has alpha channel)
>> >     gl doesn't prepare that format render.
>> >     In this case, set it argb8888 to convert the data in the png loader.
>> >
>> >     @fix
>>
>> I don't understand your commit message. I did test this code with PNG
>> GRY8 with and without alpha channel and they did both work. But if you
>> really want to disable the support for EVAS_COLORSPACE_AGRY88, you
>> should change evas_gl_image.c around line 120 (in the array directly).
>> Also it is strange that you end up with a GRY8 with alpha flags being
>> set, I am guessing, somewhere in the code we have something playing
>> with the flags that doesn't update the colorspace correctly.
>>
>
> This is not AGR88, but GRY8 with the alpha flag set in the PNG somehow.
> Hermet pushed a few commits before related to this problem (remove the
> abort()) as he encountered a PNG image, with only greyscale data, but with
> the alpha flag set. The GL texture matching algo failed to find a proper
> colorspace (GRY8 means no alpha).
>
> Do you think the PNG loader should convert to AGRY88 at load time in that
> case?
>
> In the loader:
>
>    if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) hasa = 1;
>    switch (color_type)
>      {
>       case PNG_COLOR_TYPE_RGB_ALPHA:
>          hasa = 1;
>          break;
>       case PNG_COLOR_TYPE_GRAY_ALPHA:
>          hasa = 1;
>          prop->cspaces = cspace_grey_alpha;
>          break;
>       case PNG_COLOR_TYPE_GRAY:
>          prop->cspaces = cspace_grey;
>          break;
>      }
>    if (hasa) prop->alpha = 1;
>
> I guess png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) is true but the
> color type is PNG_COLOR_TYPE_GRAY.
> This would probably mean that the image contains alpha data and not grey.
>
>
> Best regards,
>
>
>
>
>
>> >     Conflicts:
>> >
>> >         src/modules/evas/engines/gl_common/evas_gl_image.c
>> > ---
>> >  src/modules/evas/engines/gl_common/evas_gl_image.c  7 +++++++
>> >  1 file changed, 7 insertions(+)
>> >
>> > diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c
>> b/src/modules/evas/engines/gl_common/evas_gl_image.c
>> > index 248eb30..d579ada 100644
>> > --- a/src/modules/evas/engines/gl_common/evas_gl_image.c
>> > +++ b/src/modules/evas/engines/gl_common/evas_gl_image.c
>> > @@ -218,6 +218,13 @@ _evas_gl_common_image(Evas_Engine_GL_Context *gc,
>> RGBA_Image *im_im, Evas_Image_
>> >            }
>> >
>> >          cspace = im_im->cache_entry.cspaces[i];
>> > +
>> > +        /* Current GL doesn't support grayscale with transparency
>> > +           let it convert to argb8888 in loader */
>> > +        if ((cspace == EVAS_COLORSPACE_GRY8) &&
>> > +            im_im->cache_entry.flags.alpha)
>> > +          cspace = EVAS_COLORSPACE_ARGB8888;
>> > +
>> >          im_im->cache_entry.space = cspace;
>> >       }
>> >
>> >
>> > --
>> >
>> >
>> >
>>
>>
>>
>> --
>> Cedric BAIL
>>
>>
>> ------------------------------------------------------------------------------
>> Open source business process management suite built on Java and Eclipse
>> Turn processes into business applications with Bonita BPM Community Edition
>> Quickly connect people, data, and systems into organized workflows
>> Winner of BOSSIE, CODIE, OW2 and Gartner awards
>> http://p.sf.net/sfu/Bonitasoft
>> _______________________________________________
>> enlightenment-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>>
>>
>
>
> --
> Jean-Philippe André
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel



-- 
Cedric BAIL

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to