static void image16_copy_from_pixbuf(GalImage *image, eint dx, eint dy, GalPixbuf *pixbuf, eint sx, eint sy, eint w, eint h) { eint x, y; euint16 *p; if (image->negative) { p = (euint16 *)(image->pixels + image->rowbytes * (dy + h - 1) + dx * image->pixelbytes); for (y = 0; y < h; y++) { for (x = 0; x < w; x++) p[x] = pixbuf_read_pixel16(pixbuf, x + sx, y + sy); p -= image->w; } } else { p = (euint16 *)(image->pixels + image->rowbytes * dy + dx * image->pixelbytes); for (y = 0; y < h; y++) { for (x = 0; x < w; x++) p[x] = pixbuf_read_pixel16(pixbuf, x + sx, y + sy); p += image->w; } } }
static void image16_copy_from_pixbuf(GalImage *image, eint dx, eint dy, GalPixbuf *pixbuf, eint sx, eint sy, eint w, eint h) { eint x, y; euint16 *dst_buf = (euint16 *)(image->pixels + image->rowbytes * dy + dx * image->pixelbytes); for (y = 0; y < h; y++) { for (x = 0; x < w; x++) dst_buf[x] = pixbuf_read_pixel16(pixbuf, x + sx, y + sy); dst_buf += image->w; } }