| View previous topic :: View next topic |
| Author |
Message |
Ekate
Joined: 17 Apr 2007 Posts: 15
|
Posted: Mon Apr 30, 2007 9:34 am Post subject: can't load the image |
|
|
I have PHP installed in my machine and php-gtk2 alpha release
I'm trying to load the image but it doesn't work
I know that there is no error in code,'cause when I had gnope installed it worked just fine.
peace of code
| Code: |
<?php
$file='main.jpeg';
$pixbuf = GdkPixbuf::new_from_file($file);
$img = new GtkImage();
$new_pixbuf = $pixbuf->scale_simple(150, 150, Gdk::INTERP_HYPER);
$img->set_from_pixbuf($new_pixbuf);
$image_frame->add($img);
?>
|
Any thoughts?
I get the following error
Fatal error: Uncaught exception 'PhpGtkGErrorException' with message 'Failed to open file 'main.jpeg': No such file or directory' in C:\proj\chan3.php:81
Thank you in advance |
|
| Back to top |
|
 |
cweiske
Joined: 08 Dec 2005 Posts: 454 Location: Leipzig/Germany
|
Posted: Mon Apr 30, 2007 11:42 am Post subject: |
|
|
| You are really sure the file exists in your working directory, and that it has .jpeg instead of .jpg as extension? |
|
| Back to top |
|
 |
Ekate
Joined: 17 Apr 2007 Posts: 15
|
Posted: Mon Apr 30, 2007 2:24 pm Post subject: |
|
|
Of course!
File exists and has .jpeg format,not .jpg |
|
| Back to top |
|
 |
clange
Joined: 24 Jan 2006 Posts: 11
|
Posted: Mon Jul 09, 2007 11:20 am Post subject: |
|
|
i had the same problem plz try the full path of the file like: c:\\bla\\file.jpeg or /path/to/file.jpeg
mfg clange |
|
| Back to top |
|
 |
|