×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Compression of Raster Data

Compression of Raster Data

Compression of Raster Data

(OP)
Hi everybody,

i have an question to PCL.

i Print an Image an i know these Image have only 2 Colors but RGB color. (BACK == 0x00FF0000, FRONT == 0x000000FF)

Printing the images needs to much time because i Print every pixel as RGB color.

Now my question:
is it possible to Set Foreground as 1 an background color as 0 an then print only bits ?

example : 10 pixel = 11001100 11000000

Thanks for Help Tobias

 

RE: Compression of Raster Data

If this is PCL5 color, simply define a 1 BPP pallette that meets your specs.

Otherwise,

first convert your image to a monochrome .BMP

There is a 2 color pallette in the 8 bytes starting at 0x36.
That is 4 bytes each for the foreground and background. I believe the byte order is BGR-. While the image data is RGB, the pallette is BGR. I think the first 4 bytes are the foreground.

The 4th byte is not used. Leave it at 00.

Using a hex editor, change the .BMP to suit.

 

Jim Asman
http://www.spectracolorservices.com

RE: Compression of Raster Data

(OP)
ok,

i tried this and i can print black and white.

But i didnt found the command for Foreground and Background Color. And with this Command is it possible to set bit 1 to RED and 0 to GREEN ?

Sorry im new in PCL. And i didnt understand some Ports of the Documentation.

Thanks for your Help

Tobias

RE: Compression of Raster Data

(OP)
Iam Using an Brother 4040CN.

But i will use an Command that is working with (if possible) every PCL5 Printer.
 

RE: Compression of Raster Data

In PCL5 then,

1. Configure Imaga Data (CID) Defines Palette size, type etc.

<esc>*v6W 00 01 01 08 08 08

There are only 6 bytes that follow the W above. Those are hexidecimal pair values shown for a RGB palette

 
Define palette

<esc>*v###a###b###c0I

<esc>*v###a###b###c1I

In the two commands above, the ### before a, b, and c, define the RGB values respectively. These are decimal with a range from 0 to 255. The number before the I at the end is the index into the palette than the RGB values represent. As we are defining a bi-level file only 0 and 1 are valid.

Finally,

<esc>*r####s####T

where the decimal numerals specify the image width and height. The value before the s is the width.

Follow all this with the raster resolution and monochrome data and you should have your color image.

Jim Asman
http://www.spectracolorservices.com

RE: Compression of Raster Data

(OP)
Hey,

thank you very much.

It works =)

Thanks again.

Greez Tobias

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close