cupsrasterreadpixels fails

shermin sherminismail at gmail.com
Mon Sep 29 00:44:07 PDT 2008


Hi,
Value of print_fd is 0
CupsRasterOPen is "not" returning NULL

cupsRasterReadPixels returns 2585176
errno is -1209461948(resource temporarily unavailable)

What I did is I am modifying the print_device() code in libusb.c(backend) in cups 1.4.
I am trying to read the rasterdata inside this function .print_fd value I got is from usb.c which is passed to libusb.c.

while (cupsRasterReadHeader2(ras, &header))
{
       rasterData=malloc((header.cupsHeight)*(header.cupsBytesPerLine));		raster_read=cupsRasterReadPixels(ras, rasterData, ((header.cupsHeight) * (header.cupsBytesPerLine)));

   fprintf(stderr,"Raster read pixel value is %d\n",raster_read);
}

Shermin


> shermin wrote:
> > Hi,
> > I am writing backend using libusb and in print_device function i am using
> > ras = cupsRasterOpen(print_fd, CUPS_RASTER_READ);
> > cupsRasterReadPixels(ras, rasterData, ((header.cupsHeight) * (header.cupsBytesPerLine)) and this rasterData contains NO data.
> > What could be the reason?
>
> What is the value of print_fd?
>
> What is cupsRasterOpen returning?
>
> What is cupsRasterReadPixels returning?
>
> What does errno contain after the cupsRasterReadPixels call?
>
> --
> ______________________________________________________________________
> Michael R Sweet                        Senior Printing System Engineer
>





More information about the cups mailing list