Not work "gdk_imlib_copy_image"! why?
- From: =?ks_c_5601-1987?b?wK+067vz?= <dsyou hanyoung net>
- To: <gtk-list gnome org>
- Subject: Not work "gdk_imlib_copy_image"! why?
- Date: Sun, 1 Apr 2001 22:37:40 +0900
/*
*
Usage : test <filename>
*
*/
#include <gdk_imlib.h>
#include
<gdk/gdk.h>
int main(int argc, char **argv)
{
/* Be nice and tell the user if they don't, to provide a file
as an arg */
if
(argc<=1)
{
printf("Usage:\n %s
image_file\n",argv[0]);
exit(1);
}
/* Inititalise GDK
*/
gdk_init(&argc,&argv);
/* Immediately after
initialising GDK, Initialise Imlib */
gdk_imlib_init();
/* Get gdk to use imlib's visual and colormap
*/
gtk_widget_push_visual(gdk_imlib_get_visual());
gtk_widget_push_colormap(gdk_imlib_get_colormap());
/* Load
the image specified as the first argument */
im=gdk_imlib_load_image(argv[1]);
/* Copy
to a pixmap
*/
testpixmap=gdk_imlib_copy_image(im);
if(testpixmap==0x00)/******************** why does it return
NULL? ***********************************/
{
g_print("any error is occured -
testpixmap==0x00\r\n");
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]