53 list = &
Scr->ImageCache;
57 else if((name [0] ==
'@') || (strncmp(name,
"xpm:", 4) == 0)) {
59 snprintf(fullname,
GIFNLEN,
"%s%dx%d", name, (
int) cp.
fore, (
int) cp.
back);
62 int startn = (name [0] ==
'@') ? 1 : 4;
63 if((image =
GetXpmImage(name + startn, cp)) != NULL) {
68 fprintf(stderr,
"XPM support disabled, ignoring image %s\n", name);
72 else if(strncmp(name,
"jpeg:", 5) == 0) {
80 fprintf(stderr,
"JPEG support disabled, ignoring image %s\n", name);
84 else if((strncmp(name,
"xwd:", 4) == 0) || (name [0] ==
'|')) {
85 int startn = (name [0] ==
'|') ? 0 : 4;
87 if((image =
GetXwdImage(&name [startn], cp)) != NULL) {
92 else if(strncmp(name,
":xpm:", 5) == 0) {
93 snprintf(fullname,
GIFNLEN,
"%s%dx%d", name, (
int) cp.
fore, (
int) cp.
back);
103 else if(strncmp(name,
"%xpm:", 5) == 0) {
104 snprintf(fullname,
GIFNLEN,
"%s%dx%d", name, (
int) cp.
fore, (
int) cp.
back);
114 else if(name [0] ==
':') {
115 unsigned int width, height;
119 snprintf(fullname,
GIFNLEN,
"%s%dx%d", name, (
int) cp.
fore, (
int) cp.
back);
127 image->
pixmap = XCreatePixmap(
dpy,
Scr->Root, width, height,
Scr->d_depth);
128 if(
Scr->rootGC == (GC) 0) {
129 Scr->rootGC = XCreateGC(
dpy,
Scr->Root, 0, &gcvalues);
131 gcvalues.background = cp.
back;
132 gcvalues.foreground = cp.
fore;
133 XChangeGC(
dpy,
Scr->rootGC, GCForeground | GCBackground, &gcvalues);
134 XCopyPlane(
dpy, pm, image->
pixmap,
Scr->rootGC, 0, 0, width, height, 0, 0,
136 image->
width = width;
142 snprintf(fullname,
GIFNLEN,
"%s%dx%d", name, (
int) cp.
fore, (
int) cp.
back);