Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: bitmap and pack

by Discipulus (Canon)
on May 14, 2015 at 07:32 UTC ( [id://1126636]=note: print w/replies, xml ) Need Help??


in reply to bitmap and pack

hello gimcdan,
aside from pack, the mention of pixel let me think you are inspecting a template for an image: my little experience with bitmap was due to my project about Tartaglia's triangle.

As far as i remember in the image you have some header where you declare the size of the bitmap (x and y), the number of colors used and a fourth parameter i dont know..
Then you can declare a map between char and colors. In the example below the space is the background (mapped to black) and the # is mapped to red.This is mentioned in Mastering PerlTk also.

So, if you are talking about bitmap, any char is acceptable to set a pixel because it sets it's color.

sub tart_icon { return <<EOI /* XPM */ static char * Icon_xpm[] = { "32 32 4 1", " c #000000000000", "g c #00FF00", "X c #FF0000", "D c #FFFF00", " ", " ", " ", " ", " ", " ", " XXXXXXXXXXXXXXXX ", " XXXXXXXXXXXXXXXX ", " ", " ", " XX ", " XX ", " XXXX ", " XXXX ", " XXXXXX ", " XXXXXX ", " XXXXXXXX ", " XXXXXXXX ", " XXXXXXXXXX ", " XXXXXXXXXX ", " XXXXXXXXXXXX ", " XXXXXXXXXXXX ", " XXXXXXXXXXXXXX ", " XXXXXXXXXXXXXX ", " ", " ", " ", " ", " ", " ", " ", " ",}; EOI }
HtH
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1126636]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-24 22:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found