temporarily added uint->RGB conversion for Java byteorder
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user