LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 04-03-2005, 08:09 PM   #1
mcm1738
LQ Newbie
 
Registered: Mar 2005
Posts: 24

Rep: Reputation: 15
Lightbulb How to use "gif" file in linux????


OS:LINUX (FC3)
PC:HP compaq d330
GTK2.0


i wanna use"gdk-pixbuf-csource --raw test.gif > about.h "
read a file "test.gif" into "about.h" ,It's OK

then in my programm:

#include "about.h"
GdkPixbuf *pix;

pix = gdk_pixbuf_new_from_inline(9216+24, my_pixbuf, TRUE, NULL);
image = gtk_image_new_from_pixbuf(pix);

when run my programm ,i can see the test.gif,but it can not move,just like
a simple picture,

i don't know why~~~~~~~~~
i want let a gif file can show in my window~~~~~~~~~~`
i suppose i set some parameter wrong, "--raw "
how to set???
i am puzzled~~~~~~~~~~

__________________
MSN:mcm1738@sina.com
 
Old 04-04-2005, 06:59 AM   #2
ahwkong
Member
 
Registered: Aug 2004
Location: Australia
Distribution: Fedora
Posts: 282

Rep: Reputation: 30
Can you give more detail? E.g. full listing of your program...

The program fragment you posted is not useful at all.

Besides, when you says, "when run my programm ,i can see the test.gif,but it can not move,just like
a simple picture," what is exactly your meaning? You mean you can only see a gif stationed in the center of the screen? Without any window frame? Without any 'min' or 'max' window button? or just not responding to the mouse event?
 
Old 04-05-2005, 04:25 AM   #3
mcm1738
LQ Newbie
 
Registered: Mar 2005
Posts: 24

Original Poster
Rep: Reputation: 15
in my programm i want to show a gif file ,i have make it true ,but if the gif file is deleted unexpected,how can i do ??
 
Old 04-05-2005, 05:33 AM   #4
ahwkong
Member
 
Registered: Aug 2004
Location: Australia
Distribution: Fedora
Posts: 282

Rep: Reputation: 30
It is very hard to understand your English...

Well, since you are using sina.com, I think i can assume you speak mandarian. Anyway....

Are you asking about what to do if the gif is deleted? Since the gif is encoded in the header file, you do not have to worry about it.
 
Old 04-05-2005, 04:20 PM   #5
isd2301
Member
 
Registered: Mar 2005
Location: Chula Vista, CA, USA
Distribution: Ubuntu, Fedora
Posts: 41

Rep: Reputation: 15
Quote:
Originally posted by mcm1738
in my programm i want to show a gif file ,i have make it true ,but if the gif file is deleted unexpected,how can i do ??
Are you talking about an animated gif?
 
Old 04-05-2005, 07:53 PM   #6
mcm1738
LQ Newbie
 
Registered: Mar 2005
Posts: 24

Original Poster
Rep: Reputation: 15
Yes i come from China,Thank you for your help~~~~
yeah ~ i just wanna to show an animated gif,but i don't know what to do if the gif is deleted,
I use this commanduse"gdk-pixbuf-csource --raw test.gif > about.h " encode gif into "about.h"

then in my programm:

#include "about.h"
GdkPixbuf *pix;

pix = gdk_pixbuf_new_from_inline(9216+24, my_pixbuf, TRUE, NULL);
image = gtk_image_new_from_pixbuf(pix);

when my programm run ,what i can see is not an animated gif,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"bad interpreter : no such file or directory" when configure "flex" acer_peri Linux - Software 10 11-10-2010 01:19 AM
How to write a bash script to replace all "KH" to "K" in file ABC??? cqmyg5 Slackware 4 07-24-2007 09:00 AM
what is "S" instead of "X" in the file permission when i look at /usr/bin/chsh? Linux_interest Linux - Newbie 4 08-28-2004 09:22 AM
"GIF-LIB error: Wrong record type detected" Megamieuwsel Linux - General 7 04-29-2004 04:38 PM
Can't locate object method "splitpath" via package "File::Spec" RobJohnston Linux - General 2 06-28-2003 09:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration