jpeg to gif?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
elecktricity
Forum Contributor
Posts: 128
Joined: Sun Sep 25, 2005 8:57 pm
Location: Trapped in my own little world.
Contact:

jpeg to gif?

Post by elecktricity »

is it possible to convert jpeg to gif images?
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

yes, but generally images that are in jpeg format would not look good in gif format. Photos look terrible in gif format. What are you looking to convert? What type of images? the gif format works best with images that have the least amount of different colors. It works off of a color table, so the less the colors, the smaller the image size.
User avatar
elecktricity
Forum Contributor
Posts: 128
Joined: Sun Sep 25, 2005 8:57 pm
Location: Trapped in my own little world.
Contact:

Post by elecktricity »

Im in the proccess of making a program, and the end result all the images inputted into the program would be animated, there just like icons (biggest about 100x100)
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

Well images can be converted from jpg to gif and from gif to jpeg, but both formats have their strengths and weaknesses. You can get gif to display a photo decently, but in order to do so, you have to give it a huge color table, which makes the image size go up by quite a bit. If you don't mind that, then go for it.

Unfortunately, I believe gif is the only image format that supports animation.
User avatar
elecktricity
Forum Contributor
Posts: 128
Joined: Sun Sep 25, 2005 8:57 pm
Location: Trapped in my own little world.
Contact:

Post by elecktricity »

Any links would be great?
User avatar
wwwapu
Forum Contributor
Posts: 197
Joined: Wed Apr 07, 2004 11:57 am
Location: Turku, Finland

Post by wwwapu »

The Ninja Space Goat wrote:Unfortunately, I believe gif is the only image format that supports animation.
In pratice this might be true, but there is also MNG http://www.libpng.org/pub/mng/ although i've never seen it being used anywhere.
brendandonhue
Forum Commoner
Posts: 71
Joined: Mon Sep 25, 2006 3:21 pm

Post by brendandonhue »

Use imagecreatefromjpeg() and imagegif()
Post Reply