#include <gimp-print/gimp-print.h>
#include "gimp-print-internal.h"
#include <gimp-print/gimp-print-intl-internal.h>
#include <math.h>
#include <string.h>
#include "lut.h"
Go to the source code of this file.
Defines | |
#define | RAW_COLOR_TO_COLOR_FUNC(T, bits) |
#define | GRAY_TO_COLOR_RAW_FUNC(T, bits) |
|
Value: static unsigned \ gray_##bits##_to_color_raw(stp_const_vars_t vars, const unsigned char *in, \ unsigned short *out) \ { \ int i; \ int nz = 0; \ const T *s_in = (const T *) in; \ lut_t *lut = (lut_t *)(stpi_get_component_data(vars, "Color")); \ unsigned mask = 0; \ if (lut->invert_output) \ mask = 0xffff; \ \ for (i = 0; i < lut->image_width; i++) \ { \ unsigned outval = s_in[0] ^ mask; \ out[0] = outval; \ out[1] = outval; \ out[2] = outval; \ if (outval) \ nz = 7; \ s_in++; \ out += 3; \ } \ return nz; \ } Definition at line 83 of file color-raw.c. |
|
Value: static unsigned \ color_##bits##_to_color_raw(stp_const_vars_t vars, const unsigned char *in, \ unsigned short *out) \ { \ int i; \ int j; \ int nz = 0; \ const T *s_in = (const T *) in; \ lut_t *lut = (lut_t *)(stpi_get_component_data(vars, "Color")); \ unsigned mask = 0; \ if (lut->invert_output) \ mask = 0xffff; \ \ for (i = 0; i < lut->image_width; i++) \ { \ unsigned bit = 1; \ for (j = 0; j < 3; j++, bit += bit) \ { \ out[j] = s_in[j] ^ mask; \ if (out[j]) \ nz |= bit; \ } \ s_in += 3; \ out += 3; \ } \ return nz; \ } Definition at line 46 of file color-raw.c. |