On Tue, 10 Jul 2007 00:54:04 -0300 "Gustavo Sverzut Barbieri"
<[EMAIL PROTECTED]> babbled:

> On 7/9/07, Enlightenment CVS <[EMAIL PROTECTED]> wrote:
> > + * EVAS_COLORSPACE_RGB565_A5P:
> > + *
> > + * In the process of being implemented in 1 engine only. This may change.
> > + *
> > + * This is a pointer to image data for 16-bit half-word pixel data in 16bpp
> > + * RGB 565 format (5 bits red, 6 bits green, 5 bits blue), with the
> > high-byte
> > + * containing red and the low byte containing blue, per pixel. This data is
> > + * packed row by row from the top-left to the bottom right.
> > + *
> > + * If the image has an alpha channel enabled there will be an extra alpha
> > plane
> > + * after the color pixel plane. If not, then this data will not exist and
> > + * should not be accessed in any way. This plane is a set of pixels with 1
> > + * byte per pixel defining the alpha values of all pixels in the image from
> > + * the top-left to the bottom right of the image, row by row. Even though
> > + * the values of the alpha pixels can be 0 to 255, only values 0 through
> > to 32
> > + * are used, 32 being solid and 0 being transparent.
> 
> current implementation is solid is 31 (5 bits, all 1).

really? hmm - so you didn't use the code i originally had for this that was
0-32 to avoid an extra add in the blend routine.

> 
> > + * RGB values can be 0 to 31 for red and blue and 0 to 63 for green, with 0
> > + * being black and 31 or 63 being full red, green or blue respectively.
> > This
> > + * colorspace is also pre-multiplied like EVAS_COLORSPACE_ARGB8888 so:
> > + *
> > + * R = (r * a) / 32; G = (g * a) / 32; B = (b * a) / 32;
> 
> No, this is not pre-multiplied, I just convert RGB 888 to 565:
> 
>                 *da = A_VAL(sp) >> 3;
>                 *dp = RGB_565_FROM_COMPONENTS(R_VAL(sp), G_VAL(sp), B_VAL
> (sp));
> 
> RGB_565_FROM_COMPONENTS() just discard less significant bits and then
> bitwise-OR to pack them in the correct format. or do you mean "sp" is
> already pre-multiplied? I never considered this and results looks ok.

sp is already pre-multiplied - thus the rgb565 will be too :)

> 
>   /**
> > @@ -583,7 +654,7 @@
> >   * Sets the raw image data.
> >   * load for the given image object.
> >   * @param obj The given image object.
> > - * @param data The given data as 32 bit unsigned integer in format ARGB.
> 
> is this in ARGB 888 pre-multiplied?
> 
> -- 
> Gustavo Sverzut Barbieri
> --------------------------------------
> Jabber: [EMAIL PROTECTED]
>    MSN: [EMAIL PROTECTED]
>   ICQ#: 17249123
>  Skype: gsbarbieri
> Mobile: +55 (81) 9927 0010
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> enlightenment-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to