1 #include <hidd/graphics.h>
2 #include <proto/graphics.h>
7 #define SRC_PIXFMT vHidd_StdPixFmt_ARGB32
8 #define DST_PIXFMT vHidd_StdPixFmt_RGB15
10 #define SRC_PIXFMT vHidd_StdPixFmt_BGRA32
11 #define DST_PIXFMT vHidd_StdPixFmt_RGB15_LE
14 static ULONG argb
[8] =
25 static UWORD rgb15
[8];
26 static ULONG argb_inv
[8];
30 ConvertPixelsA(argb
, 0, SRC_PIXFMT
, rgb15
, 0, DST_PIXFMT
, 8, 1, 0);
31 ConvertPixelsA(rgb15
, 0, DST_PIXFMT
, argb_inv
, 0, SRC_PIXFMT
, 8, 1, 0);
36 for(i
= 0; i
< 8; i
++)
38 printf("ARGB32 %08lx = RGB15 %04x (%02x %02x %02x) (%3d%% %3d%% %3d%%) [%08x]\n",
40 (rgb15
[i
] & 0x7C00) >> 10,
41 (rgb15
[i
] & 0x03E0) >> 5,
43 ((rgb15
[i
] & 0x7C00) >> 10) * 100 / 31,
44 ((rgb15
[i
] & 0x03E0) >> 5) * 100 / 31,
45 (rgb15
[i
] & 0x001F) * 100 / 31,