LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-25-2007, 02:50 PM   #1
robbbert
Member
 
Registered: Oct 2005
Location: Hannover, Germany
Distribution: Let there be Ubuntu... :o)
Posts: 573

Rep: Reputation: 32
Graphics: PNG (or whatever) to GIF (without losing quality)


Hi, I have a set of PNG files and I'm trying to convert them to GIF (as Internet Explorer < 7.0 can't handle transparent PNGs).

I tried using "The" GIMP, Pixel Image Editor (in this case, I'd "optimized the image for GIF" before saving it), Krita, and ImageMagick.

The output in any case looks the same: scattered, pixelized.

As I remember, I'd experienced the same problem before, using Photoshop, Paint Shop Pro, and some other imaging software. Wait, some elder Photoshop version (4.0?) had an option to "export an optimized web image", and that worked roughly.

The problem is not the source format, or conversion, I think, but the output format. Anyways -

Any idea how to resolve my task?

Thanks
 
Old 03-25-2007, 03:38 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

Code:
convert img.png img.gif
should create a perfect copy. Not sure why it's not working for you, though.

Dave
 
Old 03-26-2007, 12:09 PM   #3
robbbert
Member
 
Registered: Oct 2005
Location: Hannover, Germany
Distribution: Let there be Ubuntu... :o)
Posts: 573

Original Poster
Rep: Reputation: 32
That's what I did, thanks.
Here's the image before and after...

That's hosted by imageshack.us BTW. Make sure your popup blocker is "on" ^^

Last edited by robbbert; 03-26-2007 at 12:10 PM.
 
Old 03-26-2007, 03:31 PM   #4
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Ah. The problem is that your image has transparent, but coloured areas. GIF can only do on-off transparency, which is what's causing the blocky-ness. Anything not 100% transparent is being tranformed into a colour.

If the background for the page is going to be white, then you can create a white 32x32 square (or whatever size your image is in general), and do
Code:
composite reloadxc6.png white.png reloadxc6.gif
and you'll have a smooth GIF image. You'll lose the transparency, though.

Dave
 
Old 03-28-2007, 03:00 PM   #5
robbbert
Member
 
Registered: Oct 2005
Location: Hannover, Germany
Distribution: Let there be Ubuntu... :o)
Posts: 573

Original Poster
Rep: Reputation: 32
Thanks!

Quote:
Originally Posted by ilikejam
Ah. The problem is that your image has transparent, but coloured areas. GIF can only do on-off transparency, which is what's causing the blocky-ness. Anything not 100% transparent is being tranformed into a colour.
Sorry, I didn't understand that, at all...

Quote:
Originally Posted by ilikejam
If the background for the page is going to be white, then you can create a white 32x32 square (or whatever size your image is in general), and do
Code:
composite reloadxc6.png white.png reloadxc6.gif
and you'll have a smooth GIF image. You'll lose the transparency, though.
Losing transparency would not be an option, unless transparency could be added again.

Thanks again
 
Old 03-28-2007, 03:07 PM   #6
Zention
Member
 
Registered: Mar 2007
Posts: 119

Rep: Reputation: 16
PNG has an alpha channel; blending colours with background.

GIF has transparency; showing background colour.

The places where the alpha channel is being used to blend a colour with the colour below (alpha channel) are problematic should it go to the colour or become transparent, that is the dilemma when converting to gif.

I am fairly sure IE7 supports png now.

But, there are some posts pertaining to it being a bit of a scam.

Gimp is slightly better at a default conversion.

I am sure there are workarounds for IE7 though.

Last edited by Zention; 03-28-2007 at 03:09 PM.
 
  


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
png to gif in linux? jon_k Linux - Software 4 05-25-2010 09:01 PM
gnuplot 4.2 no png, jpg or gif terminals datasink Programming 4 04-26-2007 10:13 AM
What can plotting Lat, Long on a map. (in gif, png or jpg) MikeyCarter Linux - Software 2 03-09-2007 02:07 PM
convert pe to png with good quality abd_bela Debian 1 04-02-2005 11:38 PM
CMD line tool for PDF -> HTML or JPG/PNG/GIF ilhbutshm Linux - Software 5 10-23-2004 04:18 AM


All times are GMT -5. The time now is 08:54 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration