Jump to content

Convert TIFF to JPG (on the fly maybe?)?


br3nn4n

Recommended Posts

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

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>


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.