Jump to content

Converting gif, png, to jpg


condoravenue

Recommended Posts

I want to allow a user to upload a profile picture on my site. The code below works.

 

$username = mysql_real_escape_string($_SESSION['username']);

 

$path = "../profile_pictures/".$username.".jpg";

 

$file_name = $HTTP_POST_FILES['uploadedfile']['tmp_name'];

 

copy($file_name, $path);

 

I would like to add some code in to allow the user to choose gif's and png's from their computer, and convert it to jpg. I read on somewhere something about needing GD installed. I don't know what that is or if it is installed or not.

 

If you need to know, the site is at bible-help.com.

 

Thanks for your help.

Link to comment
https://forums.phpfreaks.com/topic/245006-converting-gif-png-to-jpg/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.