[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XForms] Pixmap wrangling

From: jon
Subject: [XForms] Pixmap wrangling
Date: Tue, 01 Dec 2020 15:42:55 +0000
User-agent: Evolution 3.36.4-0ubuntu1

I am trying to make multiple variations of a single image by copying
then modifying a single included pixmap. So far I am failing.

PMSIZE is about 10 times larger than the actual data (for testing)

// Include a pixmap
#include "rgbbar.xpm"

// Later in code
char *pp;
char **ppp;

pp = (char*)calloc(1,PMSIZE);
memcpy (pp, *rgbbar_xpm, PMSIZE);

printf("Pointer created pp=  %p\n",pp);

fl_set_pixmap_data(obj, ppp );

Output of above:
Pointer created pp=  0x55f95930e780
[237 38 22 1]

In fl_create_from_pixmapdata() [pixmap.c:521]: error converting:
(Invalid file)

Can anyone suggest what I am doing wrong ? The pixmap data itself is
valid as using fl_set_pixmap_file() works fine.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]