Hi,
I have a problem with the xpm files. Please, If you can help me...
In the last version on git, branch next, I applied the patch [1]. This patch
only prints the "color" variable on the screen.
With the printf on RGetImageFromXPMData() I didn't found any problem, but with
the printf on RLoadXPM, sometimes I have something that seems to be wrong.
Normal output (IMO):
color_RLoadXPM = #a0b7d5
color_RLoadXPM = #6a8dbc
color_RLoadXPM = None
color_RLoadXPM = #ffffff
color_RLoadXPM = #000000
Wrong output (IMO):
color_RLoadXPM = #38E338E338E3
color_RLoadXPM = #FFFFFFFFFFFF
color_RLoadXPM = #41034D345144
color_RLoadXPM = #861786178E38
color_RLoadXPM = #965896589658
I am missing something? Why these color values are 12 bytes long (and not 6,
RGB)?
Thanks a lot.
kix
[1] Patch:
diff --git a/wrlib/xpm.c b/wrlib/xpm.c
index 12aadc6..c4076b5 100644
--- a/wrlib/xpm.c
+++ b/wrlib/xpm.c
@@ -117,6 +117,8 @@ RImage *RGetImageFromXPMData(RContext * context, char **xpmD
continue;
}
+ printf("color = %s\n", color);
+
if (strncmp(color, "None", 4) == 0) {
color_table[0][i] = 0;
color_table[1][i] = 0;
@@ -237,6 +239,8 @@ RImage *RLoadXPM(RContext * context, const char *file)
continue;
}
+ printf("color_RLoadXPM = %s\n", color);
+
if (strncmp(color, "None", 4) == 0) {
color_table[0][i] = 0;
color_table[1][i] = 0;
--
To unsubscribe, send mail to [email protected].