Re: well, I cheated to make it build so I should expect this...

From: Date: Tue, 20 May 2003 13:13:30 +0000
Subject: Re: well, I cheated to make it build so I should expect this...
References: 1 2 3  Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-478@lists.php.net to get a copy of this message
Hi, do you have in your php_gdk_pixbuf.dll the static method new_from_file() ?¿? I think this is the error because under Linux this script works perfect :-) In gen_gdkpixbuf.c you have: PHP_FUNCTION(gdk_pixbuf_new_from_file) { char *filename; if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "s", &filename)) return; PHP_GTK_SEPARATE_RETURN(return_value, php_gdk_pixbuf_new(gdk_pixbuf_new_from_file(filename))); return; } And the php_gdk_pixbuf_new is: PHP_FUNCTION(gdk_pixbuf_new) { long width, height; zend_bool has_alpha; GdkPixbuf *wrapped_obj; NOT_STATIC_METHOD(); if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "iib", &width, &height, &has_alpha)) { php_gtk_invalidate(this_ptr); return; } wrapped_obj = (GdkPixbuf *)gdk_pixbuf_new(GDK_COLORSPACE_RGB, (gboolean)has_alpha, 8, (int)width, (int)height); if (!wrapped_obj) { php_error(E_WARNING, "%s(): could not create GdkPixbuf object", get_active_function_name(TSRMLS_C)); php_gtk_invalidate(this_ptr); return; } php_gtk_set_object(this_ptr, wrapped_obj, le_gdk_pixbuf); } ----- Original Message ----- From: "Steph" <sfox@php.net> To: "epplestun" <epplestun@alaplaya.com>; "Frank M. Kromann" <frank@kromann.info> Cc: "PHP-GTK dev" <php-gtk-dev@lists.php.net> Sent: Tuesday, May 20, 2003 3:04 PM Subject: Re: [PHP-GTK-DEV] well, I cheated to make it build so I should expect this... > > http://talks.php.net/show/kongress-gtk-csg/20 here you > > have a good > script to > > test gdkpixbuf :-) > > heh, knew I'd seen it working _somewhere_ :) > > Sadly it isn't working here, tells me: > <b>Fatal error</b>: Call to undefined function: new_from_file() in > <b>C:\php4\ > test\pixbuftest.php</b> on line <b>17</b> > > (nb this isn't - or shouldn't be - an undefined function in my book...) > > >

« previous php.gtk.dev (#478) next »