Re: could not display images using gtk_image_new_from_file
- From: "Harinandan S" <harinandans gmail com>
- To: "Tor Lillqvist" <tml iki fi>
- Cc: gtk-list gnome org
- Subject: Re: could not display images using gtk_image_new_from_file
- Date: Mon, 17 Mar 2008 20:33:56 +0530
Thanks a lot.
TL>On Mon, Mar 17, 2008 at 7:28 PM, Tor Lillqvist <
tml iki fi> wrote:
> In my application i've
> image=gtk_image_new_from_file("a.png");
>
> If i run the application on windows i see only a broken image though the
> file is present in the directory where the executable is present.
TL>Well, it has to be in the current directory of the application, just
TL>being in the directory where the executable is located isn't good
TL>enough.
Yes. The image file was not in the current directory of the application, thats why it was not being displayed.
> I also tried giving absolute path such as C:\ but still it doesn't display image.
TL>You did remember to use double backslashes like "C:\\a.png" ?
Thanks. I had given a single slash so it was not coming up.
TL>If it still didn't work, your GTK+ installation is probably mixed up,
TL>and gdk-pixbuf can't find its loaders or something like that. How did
TL>you install the GTK+ runtime, from what files or installers, from
TL>where? Have you moved the DLLs around from where they were after
TL>unzipping or installing? You shouldn't. You should keep the directory
TL>structure intact. (You can remove unneeded stuff like the message
TL>catalogs from share\locale (or lib\locale) or the pangoft2 DLL if you
TL>don't need them.) You can move the whole GTK+ installation tree as a
TL>whole, but don't move files around inside it.
--tml
--
Regards,
Harinandan S
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]