br3nn4n Posted November 19, 2008 Share Posted November 19, 2008 I have a CMS type thing that editors can upload images to. For the program we use the images must be in TIFF format. But for the website I want JPG. I want to convert an image on the fly to JPG from TIFF, such as: Tiff | Jpg Each being links, and the second converts the image then is downloaded. Any help? I tried Google, didn't really find anything that fit what I needed. Thanks Link to comment https://forums.phpfreaks.com/topic/133305-convert-tiff-to-jpg-on-the-fly-maybe/ Share on other sites More sharing options...
zenag Posted November 19, 2008 Share Posted November 19, 2008 try this...code <? $name=$_FILES["files"]["name"]; $getext=strrchr($name, "."); if($getext==".Tiff") { $ext= strpos($name,'.'); $imagename=substr($name,0,$ext); $names=rtrim($name,'.Tiff').'.png'; $target="images/"; move_uploaded_file($_FILES["files"]["tmp_name"],$target.$names); } ?> <form action="" method="post" enctype="multipart/form-data"><input type="file" name="files"><input type="submit" name="submit" value="submit"></form> Link to comment https://forums.phpfreaks.com/topic/133305-convert-tiff-to-jpg-on-the-fly-maybe/#findComment-693288 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.