Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
X PixMap
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== XPM1 === The first (1989) XPM format is relatively similar to the XBM format.{{efn|For a description of this format in lieu of the manual (not found on the Internet), use xpm-contrib (formerly part of libXpm proper) converter (xpm2ppm, xpm1to3, xpm1to2c) source code.}} Compared to XBM, it uses additional macro definitions and variables for indexed colors, and replaces bits with characters for describing the image. The following is a black-and-white image in the 1989 XPM format. <syntaxhighlight lang="C"> #define XFACE_format 1 #define XFACE_width 48 #define XFACE_height 48 #define XFACE_ncolors 2 #define XFACE_chars_per_pixel 1 static char *XFACE_colors[] = { "a", "#ffffff", "b", "#000000" }; static char *XFACE_pixels[] = { "abaabaababaaabaabababaabaabaababaabaaababaabaaab", // and so on for 48 rows with 48 pixels </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)