nanogui: patch for microwindows in wdtv live


Previous by date: 8 Mar 2010 08:35:38 -0000 Re: Inline window manager, Greg Haerr
Next by date: 8 Mar 2010 08:35:38 -0000 Re: Inline window manager, Greg Haerr
Previous in thread: 8 Mar 2010 08:35:38 -0000 Re: patch for microwindows in wdtv live, Sung Joo, Byun
Next in thread: 8 Mar 2010 08:35:38 -0000 Re: patch for microwindows in wdtv live, Greg Haerr

Subject: Re: Re: Re: [nanogui] patch for microwindows in wdtv live
From: "Greg Haerr" ####@####.####
Date: 8 Mar 2010 08:35:38 -0000
Message-Id: <01aa01cabe9a$3fd42830$6564a8c0@winXP>

> image_png.c:GdDecodePNG() has some inconsistent part. ( it works well, but 
> inconsistent. )
> In spite of MWIMAGEHDR that returned from image_png.c:GdDecodePNG() has 
> RGB RGB ...,
> MWIMAGEHDR's compression field has not MWIMAGE_RGB flag.( only if alpha 
> channel exist.)

Mr Sung Joo -

I've applied your patch that cleans up the ARGB/ABGR image
byte order consistency when drawing images with alpha in
GdDrawImage().  I've also added quite a few comments.
Everything is in the git repository.  Please test that the
code still works well on  16bpp 565 and 555 systems.
Thanks alot!

Since you're using C bitfields for the alpha blending, the original
code would not have worked on big endian machines.  I have
added (untested) code that should work.  It would be nice if
someone could test this by running nxviewalpha.sh which
displays an .png file with alpha, on a big endian implementation.

Also, the png fixes for WDTV should be working at this
point, see below for the original descriptions.  The png
decoder will create an alpha channel if a transparent
color was specified for the image, and GdDrawImage
will not draw the transparent portions of the image.
I'm still working on the WDTV drawing patch for
GdDrawImage that draws directly to the framebuffer.
This code, while fast, should be in a driver rather
than the engine code.

Regards,

Greg


> [TAO] this png is 24bit, but with "tRNS Transparency"
> This is related to the libpng, just a special case for 24bit png (IHDR 
> Bitdepth: 8 ).
> 4.2.12 tRNS Transparency

> According to PNG_EXPAND_tRNS to build in an alpha channel using 
> trans_value.
> When the RGB is same as trans_value's RGB, it will set ALPHA to 0, 
> otherwise it will set 0xFF.
> ======================
> libpng-1.2.14/pngrtran.c
> png_do_expand()
> (row_info->color_type == PNG_COLOR_TYPE_RGB && trans_value)
> ======================

I guess that 0.92RC2 do support that.
I think that the following code work for that.  ( 
image_png.c:GdDecodePNG()  )
============================================
if (png_get_valid(state, pnginfo, PNG_INFO_tRNS))    // if 'trans_value' 
exist, then this condition is true.
     png_set_tRNS_to_alpha(state);



Previous by date: 8 Mar 2010 08:35:38 -0000 Re: Inline window manager, Greg Haerr
Next by date: 8 Mar 2010 08:35:38 -0000 Re: Inline window manager, Greg Haerr
Previous in thread: 8 Mar 2010 08:35:38 -0000 Re: patch for microwindows in wdtv live, Sung Joo, Byun
Next in thread: 8 Mar 2010 08:35:38 -0000 Re: patch for microwindows in wdtv live, Greg Haerr


Powered by ezmlm-browse 0.20.