•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 423,489 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,728 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1311 | Replies: 5
![]() |
•
•
Join Date: Dec 2007
Location: Oklahoma
Posts: 161
Reputation:
Rep Power: 1
Solved Threads: 16
you can find the information and example (10th user post down by DHKold) here:
http://us3.php.net/imagecreate
http://us3.php.net/imagecreate
•
•
Join Date: May 2008
Location: Kingdom of Saudi Arabia
Posts: 25
Reputation:
Rep Power: 1
Solved Threads: 1
•
•
Join Date: Apr 2008
Posts: 48
Reputation:
Rep Power: 1
Solved Threads: 3
Don't know why you would because jpg is a lot worse quality than png. If I were you convert to gif, but that's just me.
Convert to jpg:
Convert to gif:
Convert to jpg:
php Syntax (Toggle Plain Text)
$image = ImageCreateFromPNG("yourimage.png"); header("Content-Type: image/jpg"); ImageJpeg($image, "yourpngimage.jpg"); ImageDestroy($image);
Convert to gif:
php Syntax (Toggle Plain Text)
$image = ImageCreateFromPNG("yourimage.png"); header("Content-Type: image/gif"); ImageJpeg($image, "yourpngimage.gif"); ImageDestroy($image);
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Transfer any files on Web services by c# (C#)
- Help beta testing new CMS (PHP)
- Python and the JPEG Image File, Part 2, The Image (Python)
Other Threads in the PHP Forum
- Previous Thread: stop a process using php
- Next Thread: hide URL


Linear Mode