temporarily added uint->RGB conversion for Java byteorder

This commit is contained in:
Sven Neumann
2005-07-08 23:58:45 +00:00
parent 184895d9fb
commit d34180d5a0
2 changed files with 48 additions and 2 deletions

View File

@ -150,6 +150,27 @@ free_list (ArrayList *list)
/* RGB -> CIELAB and other interesting methods... */
#ifdef JNI_COMPILE
/* Java */
static guchar getRed (int rgb)
{
return (rgb >> 16) & 0xFF;
}
static guchar getGreen (int rgb)
{
return (rgb >> 8) & 0xFF;
}
static guchar getBlue (int rgb)
{
return (rgb) & 0xFF;
}
#else
/* GIMP */
static guchar getRed (guint rgb)
{
return (rgb) & 0xFF;
@ -162,9 +183,11 @@ static guchar getGreen (guint rgb)
static guchar getBlue (guint rgb)
{
return (rgb >>16) & 0xFF;
return (rgb >> 16) & 0xFF;
}
#endif
#if 0
static guchar getAlpha (guint rgb)
{