×
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 6 Bitmap

PCL 6 Bitmap

PCL 6 Bitmap

(OP)
Hello,

I have Bitmap in my PCL 6 file:

D1 - uint16_xy
5802 5802
F8 - attr_ubyte
89 - UnitsPerMeasure = (600, 600)
C0 - ubyte
00
F8 - attr_ubyte
86 - Measure = eInch
C0 - ubyte
03
F8 - attr_ubyte
8F - ErrorReport = eBackChAndErrPage
41 - BeginSession
C0 - ubyte
00
F8 - attr_ubyte
88 - SourceType = eDefaultDataSource
C0 - ubyte
01
F8 - attr_ubyte
82 - DataOrg = eBinaryLowByteFirst
48 - OpenDataSource
C0 - ubyte
01
F8 - attr_ubyte
26 - MediaSource = eAutoSelect
C0 - ubyte
00
F8 - attr_ubyte
28 - Orientation = ePortraitOrientation
C8 - ubyte_array
C0 - ubyte
02 - length of array = 2
41 34
F8 - attr_ubyte
25 - MediaSize = A4
43 - BeginPage
D3 - sint16_xy
6400 6400
F8 - attr_ubyte
2A - PageOrigin = (100, 100)
75 - SetPageOrigin
C0 - ubyte
00
F8 - attr_ubyte
1E - TextObjects = 0
C0 - ubyte
01
F8 - attr_ubyte
20 - RasterObjects = 1
C0 - ubyte
00
F8 - attr_ubyte
1F - VectorObjects = 0
7E - SetNeutralAxis
C0 - ubyte
00
F8 - attr_ubyte
1E - TextObjects = 0
C0 - ubyte
00
F8 - attr_ubyte
20 - RasterObjects = 0
C0 - ubyte
00
F8 - attr_ubyte
1F - VectorObjects = 0
6D - SetHalftoneMethod
C0 - ubyte
01
F8 - attr_ubyte
1E - TextObjects = 1
C0 - ubyte
01
F8 - attr_ubyte
20 - RasterObjects = 1
C0 - ubyte
01
F8 - attr_ubyte
1F - VectorObjects = 1
58 - SetColorTreatment
C0 - ubyte
01
F8 - attr_ubyte
1E - TextObjects = 1
C0 - ubyte
01
F8 - attr_ubyte
20 - RasterObjects = 1
C0 - ubyte
01
F8 - attr_ubyte
1F - VectorObjects = 1
94 - SetAdaptiveHalftoning
C0 - ubyte
02
F8 - attr_ubyte
1D - AllObjectTypes = 2
92 - SetColorTrapping
D5 - real32_xy
0000803F 0000803F
F8 - attr_ubyte
2B - PageScale = (1, 1)
77 - SetPageScale
C0 - ubyte
02
F8 - attr_ubyte
03 - ColorSpace = eRGB
6A - SetColorSpace
C0 - ubyte
00
F8 - attr_ubyte
2D - TxMode = eOpaque
78 - SetPatternTxMode
C0 - ubyte
00
F8 - attr_ubyte
2D - TxMode = eOpaque
7C - SetSourceTxMode
D3 - sint16_xy
4309 430D
F8 - attr_ubyte
4C - Point = (2371, 3395)
6B - SetCursor
C0 - ubyte
02
F8 - attr_ubyte
03 - ColorSpace = eRGB
6A - SetColorSpace
C0 - ubyte
00
F8 - attr_ubyte
64 - ColorMapping = eDirectPixel
C0 - ubyte
02
F8 - attr_ubyte
62 - ColorDepth = e8Bit
C1 - uint16
0300
F8 - attr_ubyte
6C - SourceWidth = 3
C1 - uint16
0400
F8 - attr_ubyte
6B - SourceHeight = 4
D1 - uint16_xy
1200 1800
F8 - attr_ubyte
67 - DestinationSize = (18,24)
C1 - uint16
0000
F8 - attr_ubyte
6D - StartLine = 0
C1 - uint16
0400
F8 - attr_ubyte
63 - BlockHeight = 4
C0 - ubyte
01
F8 - attr_ubyte
65 - CompressMode = eRLECompression
FB - dataLengthByte
14 - length of Embedded Data = 20
F8 FF FE 00 FD FF FF 00 FE FF FE 00 F8 FF FE 00 F8 FF FE 00
C1 - uint16
0100
F8 - attr_ubyte
31 - PageCopies = 1
44 - EndPage
49 - CloseDataSource
42 - EndSession


This file contain rectangle 3x4:
WWW  :  W - white
WRW  :  R - red
WWW
WWW

This is hex code of bitmap:
F8 FF FE 00
FD FF FF 00 FE FF FE 00
F8 FF FE 00
F8 FF FE 00

How I can decode it? In documentation I found for RLE commpression F8 it is singned Byte, F8 = -8 => we have 9 repeated points? How I can decode color, this comression similar PCX format?

Also why this file does not contain BeginImage operator? How I can know, that this hex data is bitmap.

If I found GPEG compression, how I can decode it?

RE: PCL 6 Bitmap

Alex

Your stream is not valid without the appropriate BeginImage, ReadImage and EndImage operators (as inserted below).

In order to interpret RLE compression, I imagine that (as well as decoding the 'repeat count' bytes which RLE uses), you have to take into account the current colour space settings, etc.,  from:

ColorSpace attribute of SetColorspace operator;
ColorMapping, ColorDepth and SourceHeight attributes of BeginImage operator;
StartLine and BlockHeight attributes of the ReadImage operator.

But I can't tell you how they all interact, as I haven't done any work with bitmap images for a long time.

CODE

*** PCL Analysis ***

Date/Time:  2008-11-13 12:53:32
File:       E:\Gandlake\DataFiles\Temp\Tek-Tips\xx06.prn
Size:       80 bytes
Analysis:   52 rows (excluding header and trailer lines)

Offset(dec)  Type                   Sequence          Data / Interpretation
¯¯¯¯¯¯¯¯¯¯¯  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
             Comment                                  Start Language = PCLXL requested
             Comment                                  Stream Header assumed: binary low-byte first
0000000000   PCLXL Data Type        0xd3                  sint16_xy
0000000001              Value       0x4309430d            2371 3395
0000000005   PCLXL Attribute        0xf84c              Point
0000000007   PCLXL Operator         0x6b              SetCursor
                            No.                       1
0000000008   PCLXL Data Type        0xc0                  ubyte
0000000009              Value       0x02                  eRGB
0000000010   PCLXL Attribute        0xf803              ColorSpace
0000000012   PCLXL Operator         0x6a              SetColorSpace
                            No.                       2
0000000013   PCLXL Data Type        0xc0                  ubyte
0000000014              Value       0x00                  eDirectPixel
0000000015   PCLXL Attribute        0xf864              ColorMapping
0000000017   PCLXL Data Type        0xc0                  ubyte
0000000018              Value       0x02                  e8Bit
0000000019   PCLXL Attribute        0xf862              ColorDepth
0000000021   PCLXL Data Type        0xc1                  uint16
0000000022              Value       0x0400                4
0000000024   PCLXL Attribute        0xf86b              SourceHeight
0000000026   PCLXL Data Type        0xd1                  uint16_xy
0000000027              Value       0x12001800            18 24
0000000031   PCLXL Attribute        0xf867              DestinationSize
0000000033   PCLXL Operator         0xb0              BeginImage
                            No.                       3
0000000034   PCLXL Data Type        0xc1                  uint16
0000000035              Value       0x0000                0
0000000037   PCLXL Attribute        0xf86d              StartLine
0000000039   PCLXL Data Type        0xc1                  uint16
0000000040              Value       0x0400                4
0000000042   PCLXL Attribute        0xf863              BlockHeight
0000000044   PCLXL Data Type        0xc0                  ubyte
0000000045              Value       0x01                  eRLECompression
0000000046   PCLXL Attribute        0xf865              CompressMode
0000000048   PCLXL Operator         0xb1              ReadImage
                            No.                       4
0000000049   PCLXL Data Type        0xfb                  embedded_data_byte
0000000050   PCLXL Embedded Len.    0x14                  20
0000000051                  Data    [ 20 bytes ]          [ f8 ff fe 00 fd ff ff 00 fe ff fe 00 f8 ff fe 00 ]
0000000067                                                [ f8 ff fe 00 ]
0000000071   PCLXL Operator         0xb2              EndImage
                            No.                       5
0000000072   PCLXL Data Type        0xc1                  uint16
0000000073              Value       0x0100                1
0000000075   PCLXL Attribute        0xf831              PageCopies
0000000077   PCLXL Operator         0x44              EndPage
                            No.                       6
0000000078   PCLXL Operator         0x49              CloseDataSource
                            No.                       7
0000000079   PCLXL Operator         0x42              EndSession
                            No.                       8

*** End of analysis ***

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