[cups.general] cupsrasterreadpixels fails

Michael R Sweet msweet at apple.com
Mon Sep 29 06:54:23 PDT 2008


shermin wrote:
> Hi,
> Value of print_fd is 0
> CupsRasterOPen is "not" returning NULL
> 
> cupsRasterReadPixels returns 2585176

Is 2585176 equal to cupsHeight * cupsBytesPerLine?

Why do you think the rasterData buffer contains no data?

> 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
>>
> 
> _______________________________________________
> cups mailing list
> cups at easysw.com
> http://lists.easysw.com/mailman/listinfo/cups


-- 
______________________________________________________________________
Michael R Sweet                        Senior Printing System Engineer





More information about the cups mailing list