Hi Guys
I used to use gdk-pixbuf-csource to generate the pixel buffer in C for
IupImage(), soon I found the images had a rotate-over problem. I
googled around and confirmed the gdk-pixbuf-csource is not the correct
tool but the iupview so I decide to write a gdk-pixbuf-csource-alike
tool called iupimage-csource. It's a light weight command line tool
around 140k and only accept jpg/gif/png/bmp/ppm as inputs. The command
line looks like this:
iupimage-csource -n my_icon_name myicon.png > my_icon_name.h
The output look like this:
#ifndef _MY_ICON_NAME_H_
#define _MY_ICON_NAME_H_
const int my_icon_name_width = 510;
const int my_icon_name_height = 383;
const int my_icon_name_channel = 3;
#ifdef __SUNPRO_C
#pragma align 4 (my_icon_name)
#endif
#ifdef __GNUC__
const unsigned char my_icon_name[] __attribute__ ((__aligned__ (4))) =
#else
const unsigned char my_icon_name[] =
#endif
{
/* This is line 0 */
4, 24, 4, 4, 24, 4, 4, 24, 4, 4, 24, 4, 4, 24, 4,
4, 23, 4, 4, 24, 4, 4, 24, 4, 4, 24, 4, 4, 24, 4,
...
};
#ifdef __SUNPRO_C
#pragma align 4 (my_icon_name_palette)
#endif
#ifdef __GNUC__
const char *my_icon_name_palette[] __attribute__ ((__aligned__ (4))) =
#else
const char *my_icon_name_palette[] =
#endif
{
};
#endif /* _MY_ICON_NAME_H_ */
Please don't get me wrong about iupview. There's nothing bad in
iupview. I did this just because firstly, I need something look and
feel like gdk-pixbuf-csource. Secondly since the iupview is the only
tool for IupImage, an alternative could be flourish for the IUP
community.
Source package is attached in this email. Please don't hesitate write
to me if more information is required.
Best wishes
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users