To display a gray scale bitmap image in PCL5 (6631 Views)
Reply
Advisor
varun1186
Posts: 20
Registered: ‎07-02-2013
Message 1 of 5 (6,631 Views)

To display a gray scale bitmap image in PCL5

[ Edited ]

I have a gray scale bitmap image  ( Sample gray scale image is attached).

 

I need to show this gray scale image in pcl file using PCL5 commands.

 

can any one provide a codesnippet / guidelines to implement this.  

 

 

Thanks in advance

 

Honored Contributor
John Getzke
Posts: 2,631
Registered: ‎02-27-2009
Message 2 of 5 (6,610 Views)

Re: To display a gray scale bitmap image in PCL5

PCL5 printer launguage technical reference manual:

http://h20000.www2.hp.com/bc/docs/support/SupportManual/bpl13210/bpl13210.pdf

 

Everything you need to know about programing in PCL5 can be found there.

 

Kudo's appreciated : ) (The purple thumbs up)
Honored Contributor
Chris H
Posts: 3,969
Registered: ‎06-04-2004
Message 3 of 5 (6,596 Views)

Re: To display a gray scale bitmap image in PCL5

Your Grayscale_1_.bmp.txt file is not a .bmp bitmap image file - it is a Portable Network Graphics .png format file.

 

If you convert this .png file to a .bmp format (e.g. open using Paint, then SaveAs to save in .bmp format), then you could use the Image Bitmap tool in the PCL Paraphernalia application (available via http://www.pclparaphernalia.eu ) to convert the .bmp file to a file containing a PCL5 raster image.

 

You could then use the PRN File Analyse tool in the same application to decode the generated PCL in that file.

Advisor
varun1186
Posts: 20
Registered: ‎07-02-2013
Message 4 of 5 (6,574 Views)

Re: To display a gray scale bitmap image in PCL5

Hi Chris,
Yes, you are right this is a .png file and we wrongly changed the extension to .bmp.
Can you please provide some code snippet/guidlines to display this image using PCL5?
Honored Contributor
Chris H
Posts: 3,969
Registered: ‎06-04-2004
Message 5 of 5 (6,556 Views)

Re: To display a gray scale bitmap image in PCL5

HP publish details of the PCL raster format in the PCL5 Technical Reference manual.

 

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:

http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=bpl04568 

Be aware that some of the manuals (in PDF format) are multi-megabyte downloads.

 

I have very little knowledge of the .png format, but I'm fairly sure that details of the format are published somewhere.

 

I think that Microsoft publish details of the .bmp format; the most common variant is version 3, but there are later (less-used v4 and v5) and obsolete (OS/2) versions, so you will need to decide whether or not to support all variants.

 

Doing the conversion from (v3) .bmp to PCL raster format is not a trivial process; it it is too complex a task to try to post code snippets - and anyway, even if someone was willing to do this, you'd ideally need to specify what programming language you will be using.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.