38 for (x = 0; x < width; x++)
39 memcpy(
linebuf + x * 3, cmap + buf[x] * 3, 3);
41 MSG_WARN(
"Gif:: image lacks a color map\n");
45 for (x = 0; x < width; x++)
46 memset(
linebuf + x * 3, buf[x], 3);
54 for (x = 0; x < width; x++) {
55 uint_t white = buf[x * 4 + 3];
56 linebuf[x * 3] = buf[x * 4] * white / 0x100;
57 linebuf[x * 3 + 1] = buf[x * 4 + 1] * white / 0x100;
58 linebuf[x * 3 + 2] = buf[x * 4 + 2] * white / 0x100;
65 MSG_ERR(
"Imgbuf_rgb_line: type not set...\n");
78 ((
Imgbuf*)v_imgbuf)->ref();
87 ((
Imgbuf*)v_imgbuf)->unref();
97 MSG_ERR(
"a_Imgbuf_new: layout is NULL.\n");
115 return ((
Imgbuf*)v_imgbuf)->lastReference () ? 1 : 0;
129 ((
Imgbuf*)v_imgbuf)->copyRow(y, (
byte *)newbuf);
137 ((
Imgbuf*)v_imgbuf)->newScan();
The platform independent interface for image buffers.
The central class for managing and drawing a widget tree.
void * dRealloc(void *mem, size_t size)
#define dReturn_if_fail(expr)
static size_t linebuf_size
void * a_Imgbuf_new(void *layout, int img_type, uint_t width, uint_t height, double gamma)
Create a new Imgbuf.
void a_Imgbuf_ref(void *v_imgbuf)
Increment reference count for an Imgbuf.
static uchar_t * Imgbuf_rgb_line(const uchar_t *buf, DilloImgType type, uchar_t *cmap, uint_t width, uint_t y)
void a_Imgbuf_update(void *v_imgbuf, const uchar_t *buf, DilloImgType type, uchar_t *cmap, uint_t width, uint_t height, uint_t y)
Update the root buffer of an imgbuf.
int a_Imgbuf_last_reference(void *v_imgbuf)
Last reference for this Imgbuf?
void a_Imgbuf_unref(void *v_imgbuf)
Decrement reference count for an Imgbuf.
void a_Imgbuf_new_scan(void *v_imgbuf)
Reset for a new scan from a multiple-scan image.
The core of Dw is defined in this namespace.
@ DILLO_IMG_TYPE_CMYK_INV