Hello
I am tying to use gd2 to convert a photo to the jpeg format
The photo can either be: png, bmp or gif
can anyone know how this can be done?
I would appreciate a code sample, or a reference to the right gd2 functions
regards
using gd2 to convert images to jpeg fomat
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
use getimagesize() to find the type you are dealing with. Use imageCreateFromPNG()/imageCreateFromGIF()/imageCreateFromBMP() to load the image, and imageJpeg() to dump it back out..
Moved to Graphics.
Moved to Graphics.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA