Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb Site ManagementScripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old January 19th, 2004, 02:26 PM
hknight hknight is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 297 hknight User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 15 m 2 sec
Reputation Power: 6
I need to convert a gif to a jpg in realtime

I am looking for a script that will convert a gif picture to either a jpg or a png in realtime.

So that convert.php?picture.gif.jpg or whatever returns a jpeg of the original image picture.gif.

I need it to work with PHP or Perl (prefferably PHP) in a Linux enviroment. I do not have root access. I can use binaries such as NETPBM. Any ideas?

Thanks,
Hank

Reply With Quote
  #2  
Old January 19th, 2004, 03:03 PM
mttatkns mttatkns is offline
Got source?
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Mar 2003
Location: Laguna Niguel, California, USA
Posts: 2,332 mttatkns User rank is Private First Class (20 - 50 Reputation Level)mttatkns User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Is imagemagick installed?

Reply With Quote
  #3  
Old January 20th, 2004, 10:04 AM
hknight hknight is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 297 hknight User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 15 m 2 sec
Reputation Power: 6
imagemagick is not installed but I could install it. NETPBM is installed. What do I need to make it work?

Reply With Quote
  #4  
Old January 20th, 2004, 10:33 AM
hknight hknight is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 297 hknight User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 15 m 2 sec
Reputation Power: 6
I found the answer, thanks to Andrew.

PHP Code:
<?php 
$netpbmPath 
"/fill/this/in/with/the/netpbm/path"//don't put a slash on the end 

header ("Content-Type: image/png"); 

$file $_SERVER['QUERY_STRING']; 
echo `
$netpbmPath/giftopnm $file | $netpbmPath/pnmtopng`; 
?>

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb Site ManagementScripts > I need to convert a gif to a jpg in realtime


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway