• Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About GleyRejeb

  • Rank
  • Birthday June 29

Previous Fields

  • Languages
    German, Englich, French, Arabic

Profile Information

  • Gender
  • Location
  • Interests
    Software Development

Recent Profile Visitors

163 profile views
  1. Hi again , i added this code to my script , but i cant move on .. can someone help me ?? <?php $imageOrigine = "images/cat.tiff"; $image = new Imagick(); $image->pingImage($imageOrigine); $image->readImage($imageOrigine); $image->setImageFormat("jpg"); $image->writeImage("temp.jpg"); ?>
  2. i"ve already installed the imagick but I still have problems ( Fatal error: Class 'Imagick' not found in C: )
  3. No i can't, because i want to build this for clients and i work with peaple who use many files from TIFF , thats why the gd way is to create a php function ...
  4. Hello Everybody, How can i convert an image from .tiff to .jpg using php ? please , need help !!! I've already seen many exples on Stackoverflow but there were not helpful. I'am building a bildgallery using PHP and i created a thumbnails to save the images in this thunmbnails . but i didnt know that many browsers like Chrome or firefox dont support the TIFF files .so i dont hv a choice just to create a PHP function to convert my TIFF files to jpg or png ... Do you have any Idea ? Hier is my Code : <?php $my_images_arr = scandir("images"); // print_r($my_images_arr); $img_string = ""; // $imageFileTyp = pathinfo('images', PATHINFO_EXTENSION); foreach ($my_images_arr as $image_name) { if( strlen ($image_name) > 2 && strrpos($image_name,'.db') != true ) { $img_string .= '<img src ="images/'.$image_name.'">'; } elseif ( strrpos($image_name,'.tif') === true ) { $image_name = preg_replace('.tif', '.jpg', $image_name); } } ?> <!DOCTYPE html> <html > <head> <title> Bilder Galerie </title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <style type="text/css"> div#buttons{ position:absolute; margin-left:-258px; } div#gHolder{ width: 1348px; height: auto; margin: 0 auto; background-color: #FFA500; padding: 10px; position:fixed; } div#theBigImageHolder{ width: 0px; height: 0px; background-color: white; } div#thumbnailsHolder{ width: 393px; height: 940px; background-color: white; margin: -8px 14px auto; padding: 4px; overflow: auto; float: none; } div#Holder{ background-color: #FFA500; width: 530px; height: 960px; float: right; } div#theBigImageHolder > img{ border: 15px solid #3e2b14; width: 900px; height: 917px; /*margin: 71px 447px auto;*/ /*box-shadow: 0px 0px 3px 749px rgba(11, 12, 12, 0.95);*/ margin-top: -8px; margin-left:422px; top: 0; left: 0; right: 0; bottom: 0;*/ } div#thumbnailsHolder > img{ width: 90px; height: 90px; display: block; float: left; margin: 2px; transition: border-radius 0.3s linear 0s; overflow: auto; } div#thumbnailsHolder > img:hover{ border-radius: 100px; cursor:pointer; } </style> <script type ="text/javascript"> function imgFunc() { var bigImage = document.getElementById("BigImage"); var thumbnailsHolder = document.getElementById("thumbnailsHolder"); thumbnailsHolder.addEventListener("click",function(event){ if ( == "IMG"){ bigImage.src =; } },false); } window.addEventListener("load",imgFunc,false); </script> </head> <body> <div id ="gHolder"> <div id="theBigImageHolder"> <?php echo '<img src="images/'.$my_images_arr[0].'" id="BigImage">'; ?> <!-- <img src="images/mench.jpg" id="BigImage"> --> </div> <div id="thumbnailsHolder"> <?php echo $img_string; ?> <!-- <img src="images/name1.jpg"> <img src="images/wolf.jpg"> <img src="images/panda.jpg"> <img src="images/hund.jpg"> --> </div> </div> <div id="Holder"> <!-- <div id="buttons"> --> <!-- <form action="upload.php" method="post" enctype="multipart/form-data"> --> <!-- <p>Bitte eine Datei auswaehlen<br> --> <!-- <input type="file" name="image"> <br> --> <!-- <input type="submit" value="Hochladen"> --> <!-- </form> --> <!-- </div> --> <center> <br><br> <form action="upload.php" method="post" enctype="multipart/form-data"> Datei auswaehlen:<input type="file" name="image"><br /><br /> beschreibung:<input type="text" name="desc"><br /><br /> <input type="submit" name="upload" value="Hochladen"> </form> </center> </div> </body> </html>
  5. Hello Everybody,

    How can i convert an image from .tiff to .jpg using php ?

    please , need help !!!

    1. Show previous comments  2 more
    2. dsonesuk


      I suggest you post on a topic, not your status, saying that! Your code just replaces a .tif extension for .jpg, and that's it, it still is formatted as tif image, you need to use php to take the tiff image format to required image type, then create that type image in a folder of your choice.

      You are basically swapping mini cooper emblem for a Jaguar emblem, but its STILL a mini cooper.

    3. GleyRejeb


      okey , understand !! but its not easy ... can you help me please to write this function ?

    4. GleyRejeb


      Thank you :)