How to find out end of file in raster format

solomon slmnraj.raj25 at gmail.com
Tue Dec 8 11:32:50 PST 2009


> On Dec 7, 2009, at 11:54 AM, solomon wrote:
> > ...
> > how do i find out blank lines in the raster data ?
> > is it like
> > ex:  if(buffer =3D=3D NULL) // declare as blank line
> >=20
> > Please give me some ideas
>
> You have to look at the data in the line buffer.  For RGB and grayscale =
> color spaces, you can compare the lines to 255 to see if it is blank:
>
>     if (buffer[0] =3D=3D 255 && !memcmp(buffer, buffer + 1, =
> header.cupsBytesPerLine - 1))
>     {
>       // line is blank
>     }
>     else
>     {
>       // line is not blank
>     }
>
> For CMY, CMYK, and K color spaces, compare buffer[0] to 0 instead of 255 =
> (the memcmp is the same).
>
> ___________________________________________________
> Michael Sweet, Senior Printing System Engineer
>
>
>
Sorry, this time also another issue came for longer heights it's not printing any data, is it memory allocation problem or printer may not support the long data storage

thanks.




More information about the cups-devel mailing list