Lines Matching defs:image

137 #define STRIP_HEIGHT	256	/* # lines we increment image height */
1178 /* The netpbm-package does not define raw image data with maxval > 255. */
1180 /* to read the image. */
1255 /* libpng will abort if the profile and image colour spaces do not match*/
1269 fprintf(stderr, "Ignoring 'GRAY' space ICC profile because the image is RGB.\n");
1273 fprintf(stderr, "Ignoring 'RGB ' space ICC profile because the image is Grayscale.\n");
1324 advance (Image * image)
1326 if (++image->x >= image->width)
1328 image->x = 0;
1329 if (++image->y >= image->height || !image->data)
1333 if (image->data)
1334 old_size = image->height * image->width * image->num_channels;
1336 image->height += STRIP_HEIGHT;
1337 new_size = image->height * image->width * image->num_channels;
1339 if (image->data)
1340 image->data = realloc (image->data, new_size);
1342 image->data = malloc (new_size);
1343 if (image->data)
1344 memset (image->data + old_size, 0, new_size - old_size);
1347 if (!image->data)
1348 fprintf (stderr, "%s: can't allocate image buffer (%dx%d)\n",
1349 prog_name, image->width, image->height);
1350 return image->data;
1361 Image image = { 0, 0, 0, 0, 0, 0 };
1416 fprintf (stderr, "%s: scanning image of size %dx%d pixels at "
1421 fprintf (stderr, "%s: scanning image %d pixels wide and "
1433 image.num_channels = 1;
1442 image.num_channels = 3;
1507 /* We're either scanning a multi-frame image or the
1508 scanner doesn't know what the eventual image height
1511 the image. */
1512 image.width = parm.bytes_per_line;
1516 don't end up realloc'ing in when the image has been
1518 image.height = parm.lines - STRIP_HEIGHT + 1;
1520 image.height = 0;
1522 image.x = image.width - 1;
1523 image.y = -1;
1524 if (!advance (&image))
1536 image.x = image.y = 0;
1578 image.num_channels = 3;
1581 image.data[offset + 3 * i] = buffer[i];
1582 if (!advance (&image))
1592 image.num_channels = 1;
1595 image.data[offset + i] = buffer[i];
1596 if (!advance (&image))
1606 image.num_channels = 1;
1609 image.data[offset + i] = buffer[i];
1610 if (!advance (&image))
1745 image.height = image.y;
1750 image.height, parm.depth, resolution_value,
1755 image.height, parm.depth, ofp);
1760 image.height, parm.depth, resolution_value,
1787 for (i = 0; i < image.height * image.width; i += 2)
1790 LSB = image.data[i];
1791 image.data[i] = image.data[i + 1];
1792 image.data[i + 1] = LSB;
1797 fwrite (image.data, 1, image.height * image.width * image.num_channels, ofp);
1824 if (image.data)
1825 free (image.data);
1872 Image image = { 0, 0, 0, 0, 0, 0 };
1902 fprintf (stderr, "%s: scanning image of size %dx%d pixels at "
1906 fprintf (stderr, "%s: scanning image %d pixels wide and "
1914 image.data = malloc (parm.bytes_per_line * 2);
1916 clean_buffer (image.data, parm.bytes_per_line * 2);
1919 status = sane_read (device, image.data, parm.bytes_per_line, &len);
1920 pass_fail (parm.bytes_per_line, len, image.data, status);
1924 clean_buffer (image.data, parm.bytes_per_line * 2);
1926 status = sane_read (device, image.data, 1, &len);
1927 pass_fail (1, len, image.data, status);
1933 clean_buffer (image.data, parm.bytes_per_line * 2);
1935 status = sane_read (device, image.data, i, &len);
1936 pass_fail (i, len, image.data, status);
1943 clean_buffer (image.data, parm.bytes_per_line * 2);
1945 status = sane_read (device, image.data, i - 1, &len);
1946 pass_fail (i - 1, len, image.data, status);
1953 if (image.data)
1954 free (image.data);
2220 fprintf(stderr, "Unknown output image format '%s'.\n", optarg);
2361 Start image acquisition on a scanner device and write image data to\n\
2384 --batch-print print image filenames to stdout\n\
2442 "image acquisition device you want to use. As an example,\n"
2864 fprintf (stderr, "cannot close image file\n");