How to import gif in c programming language?

Asked By 50 points N/A Posted on -
qa-featured

Hello fellows,

How to import gif in c programming language? I am dealing with java programming language since first year college and now that I am in the next level my teachers introduced c programming language. Java and C are much different with each other so I am having a hard time to adapt c. I hope you can help me to import gif in C.

Regards,

Shannon Larry.

SHARE
Best Answer by Aust Wilson
Best Answer
Best Answer
Answered By 5 points N/A #182919

How to import gif in c programming language?

qa-featured

In order to use Java, you will need Java VM and a Java compiler.  This Java compiler produces class files that the VM understands.  In C and C++, VM is not needed, the result of a build is an EE file which runs on the native OS.  Like Java, you can use it to compile the individual source files into object files.  Creating an EXE file is known as “Linking,” it’s like making a JAR file in Java.  The most important thing is to get a compiler set up and my best recommendation is to use “gcc/g++” on Linux, “Code::Blocks with MinGW” on Windows, or “XCode” on Mac.

Java uses imports and doesn’t have a pre-processor, it looks something like this:

1

importjava.lang.String;

With the use of C and C++, you may need to use “using declarations” to provide short names.  Something like:

1

2

#include <string>

usingnamespacestd;

C and C++ take much longer to compile because they include more statements.

Answered By 0 points N/A #182921

How to import gif in c programming language?

qa-featured

Hi Larry

Coming from Java, you might find C quite challenging because in Java you have a lot of functionalities already implemented.

As for reading and manipulating GIF images in C, you can either build your own function if you go through the file format for GIF. I had implemented a Header parser for GIF.

However i don't think you are looking to write your own functions. In that case, you can use either of the following two which came to my notice when i was researching:

1. https://opensource.apple.com/source/cups/cups-59/filter/image-gif.c

2. GIFLIB Library by Eric Steven Raymond. You can download it from http://giflib.sourceforge.net/gif_lib.html.

All you need to do is include the source files in your implementation and link to the libraries from the project properties page.

Hope this helps you in your work.

Regards

Windley

Related Questions