×
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

PCL Color Problem

PCL Color Problem

PCL Color Problem

(OP)
Hi everybody,

i have an problem with PCL Commands.
I try to print an 24Bit RGB Image with PCL.
But i don't know why it doesn't work.

Here my commands.

Start with RESET and PCL init

1. // Set 24bit RGB color
Command : \x1B*r3U
2. // the set Raster presenation
Command : \x1B*r0F
3. // set resolution
Command : \x1B*t300R
4. // Height for the Image == 30pxl
Command : \x1B*r30T
5. // Widthfor the Image == 30pxl
Command : \x1B*r30S
6. // Now Start the Grafik
Command : \x1B*r1A
7. // Set Data Format(RGB, 8bit for each Color)
Command : \x1B*v6W\x0\x3\x0\x8\x8\x8
8. // then Set compression off
Command : \x1B*b0M
9. // now i will send the data
// repeat the command for height=30 times
Command : \x1B*b90W 30 x (#r7-0#g7-0#b7-0) ...
10. after this i stop raster graphic
Command : \x1B*rC

the reset commands

now the printer prints right width and height.
but the wrong colors. only red and black not the RGB colors.

but why ???

I Hope someboy can help me.

Thanks for reply.
Tobias  

RE: PCL Color Problem

The following (annotated) PCL should print a small rectangle containing red, green and blue columns, although (as I'm now retired and have no access to a colour LaserJet) I can't be absolutely sure of this.

Where sequences include binary (non ASCII) bytes, these are shown in hexadecimal format within [ ] delimiters.

I've set the raster resolution to 75 dpi in order to make the rectangle a reasonable size.

I've also omitted all but the first and last of the 30 'raster row' sequences for brevity.

I've left in the 'simple colour' palette selection, although (as the raster image uses 'direct pixel' encoding) this is superfluous.


CODE


Sequence          Data / Interpretation
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
<Esc>E            Printer Reset
<Esc>&u600D       Unit-of-Measure (PCL units per inch)
<Esc>&l26A        Page Size: A4
<Esc>*p1200x      Cursor Position (PCL units): Horizontal
       1800Y      Cursor Position (PCL units): Vertical
<Esc>*r3U         Simple Colour: 3-Plane RGB Palette
<Esc>*r0F         Raster Graphics Presentation: Logical
<Esc>*t75R        Raster Graphics Resolution (dots per inch)
<Esc>*r30T        Raster Height (raster rows): Source
<Esc>*r30S        Raster Width (pixels): Source
<Esc>*r1A         Start Raster Graphics: Left Margin at X
<Esc>*v6W         Configure Image Data
[ 6 bytes ]       [ 00 03 00 08 08 08 ]
<Esc>*b0M         Set Compression Mode: Unencoded
<Esc>*b90W        Transfer Raster Data (Row/Block)
[ 90 bytes ]      [ ff 00 00 ff 00 00 ff 00 00 ff 00 00 ff 00 00 ff ]
                  [ 00 00 ff 00 00 ff 00 00 ff 00 00 ff 00 00 00 ff ]
                  [ 00 00 ff 00 00 ff 00 00 ff 00 00 ff 00 00 ff 00 ]
                  [ 00 ff 00 00 ff 00 00 ff 00 00 ff 00 00 00 ff 00 ]
                  [ 00 ff 00 00 ff 00 00 ff 00 00 ff 00 00 ff 00 00 ]
                  [ ff 00 00 ff 00 00 ff 00 00 ff ]
. . .
. . .             Comment - raster data sequence repeated 30 times in all
. . .
<Esc>*b90W        Transfer Raster Data (Row/Block)
[ 90 bytes ]      [ ff 00 00 ff 00 00 ff 00 00 ff 00 00 ff 00 00 ff ]
                  [ 00 00 ff 00 00 ff 00 00 ff 00 00 ff 00 00 00 ff ]
                  [ 00 00 ff 00 00 ff 00 00 ff 00 00 ff 00 00 ff 00 ]
                  [ 00 ff 00 00 ff 00 00 ff 00 00 ff 00 00 00 ff 00 ]
                  [ 00 ff 00 00 ff 00 00 ff 00 00 ff 00 00 ff 00 00 ]
                  [ ff 00 00 ff 00 00 ff 00 00 ff ]
<Esc>*rC          End Raster Graphics
<Esc>E            Printer Reset

RE: PCL Color Problem

(OP)
Hi,

thanks for your anwser.
I tried your example.
But i've got the same Problem.
He prints Red Black Red.

It's exactly the same Result.

Have you an another Idea ?

But really thanks.

Tobias

RE: PCL Color Problem

What happens if you move the Configure Image data command in Line 7 so it precedes the raster start in Line 6?

I always use a CMY palette myself in PCL. Ink and RGB don't mix well in my head.

Jim Asman
http://www.spectracolorservices.com

RE: PCL Color Problem

(OP)
hi,

i think the problem is i use the printer "hp deskjet 5150" and he can't use pcl 5.
But one thing i don't understand, i thought these command i used are pcl 3 ...

Thanks everbody.

Tobias

RE: PCL Color Problem

AFAIK, No!

The Configure Image Data Command is PCL5c. End of story.

A PCL5c printer can dither the image, so you can send 24 bit data to it directly. A PCL3 printer will require a dithered image in 3 separate planes.

Jim Asman
http://www.spectracolorservices.com

RE: PCL Color Problem

(OP)
Damn....

ok thx really,

one last question.
when i transfer the data bytes by plane, can i use RGB or only CMYK ??

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