PHP-GTK2 Cookbook Forum
Welcome, Guest
Please Login or Register.    Lost Password?
trouble with GdkPixbuf. (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: trouble with GdkPixbuf.
#188
Quijote_SHIN!! (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
trouble with GdkPixbuf. 2 Months, 2 Weeks ago Karma: 0  
Hi! i'm making time to come here..
i don't know where post it.

many time having the same problem and no time to resolve

for all who have problems to run an script with pixbuf and want to "add an image from file", specifically on windows platforms
the simple way to resolve them is wrote the entire path to the image, even when the image are in the same directory.

example

image in the same directory
Code:
$image = "image.png";
$pixbuf=GdkPixbuf::new_from_file($image);
change to
Code:
$image = "c:/path/to/directory/image.png";
$pixbuf=GdkPixbuf::new_from_file($image);
i hope to be a big help for all. quijote shin. /* Aunque tuviera el don de profecía y descubriera todos los misterios aunque tuviera tanta fe como para trasladar montes, si me falta amor nada soy. 1° corintios 13 */
 
 
Last Edit: 2008/05/05 06:09 By Quijote_SHIN!!.
  The administrator has disabled public write access.
#189
wim stockman (User)
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
Re:trouble with GdkPixbuf. 2 Months, 2 Weeks ago Karma: 0  
Under windows you always have to use the syntax
"./your_file.jpg" for files in the same directory
for files in one directory lower use "../your_file.jpg

maybe that will help your troubles relative filepath are better otherwise people will not be able to install there program where they want it.

greeting

Wim Stockman
 
  The administrator has disabled public write access.
#233
Quijote_SHIN!! (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
Re:trouble with GdkPixbuf. 2 Months ago Karma: 0  
but i don't know what happened to my script
over windows and gnulinuz platform, do not work just including the name of the image
i need type the entire path ..
even if the file are in the same directory
on Linux I use

./
and
../

is the same for windows. but U.U it won't work.
was testing with kksou scripts and i got the same problem.

and exist a function to know the fullpath of a file.. i remember because i make a script XD but don't remember how are the script XD
but is just parse the path to get where really we are



/*
Aunque tuviera el don de profecía y descubriera todos los misterios

aunque tuviera tanta fe como para trasladar montes, si me falta amor nada soy.
1° corintios 13
*/
Quijote Shin
 
 
Last Edit: 2008/05/24 08:42 By Quijote_SHIN!!.
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Copyright © 2006-2008. kksou.com. All Rights Reserved