Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PCL Colour Raster Problem

Status
Not open for further replies.

carlmcg

Programmer
Jan 4, 2005
7
GB
Dear all, I have a block of data that is basically a BMP file without the header which I believe to be of the format RGBRGBRGB etc. I am trying to output this in PCL without much joy, I am getting a red block with assorted garbage within. Any help would be appreciated, the PCL looks something like this:

<Esc>*v6W Configure image data = 6
{<NUL><ETX><NUL><BS><BS><BS>}
<Esc>*t75R Raster resolution 75 dots per inch
<Esc>*r160s Raster width = 160 pixels at current resolution
160T Raster height = 160 raster rows
<Esc>*r3U Number of planes per row = 3
<Esc>*b0M Raster compression mode, unencoded
<Esc>*r1A Start raster graphics at current cursor
<Esc>*b480W Transfer 480 bytes of raster data
0 1 2 3 4 5 6 7 - 8 9 A B C D E F 0123456789ABCDEF
0000 FF FF FF FF FF FF FF FF - FF FF FF FF FF FF FF FF ................

Thanks!
 
The raster image has to be encapsulated and transformed into a PCL format.

The following link provides a brief history of the PCL language, and links to the PCL Technical Reference manual, and also to other PCL5 & PJL manuals:


The PCL5 Technical Reference manual describes various monochrome raster formats (unencoded, Run-Length Compression, Tagged Image File Format, Delta-Row Compression, Adaptive Compression, etc.).

The Colour Technical Reference manual expands on this to describe how colour raster images are encoded.

Be aware that some of the manuals (in PDF format) are multi-megabyte downloads.
 
I fully understand the PCL monochrome raster format and have read the Colour Tech Ref, most of the above PCL is taken from this.

As can be seen from the CID command, I am trying to output a colour image as Mode 3: Direct By Pixel (page 2-11), this shouldn't require any transformation unless my understanding is wrong?
 
Get rid of the <esc>*r3U.

You would appear to be using a single plane 24 bits/pixel.

Jim Asman
 
Hi, cheers, yes that was one problem along with the order I was reading the image bytes. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top