SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot soart's Avatar
    Join Date
    Nov 2003
    Location
    Norwich UK
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    imagemagick and php

    If anyone here is familiar with using imagemagick could you please have a look at this and tell me where I'm going wrong

    PHP Code:
     <?php
        $size 
    preg_split('/ /'$dims, -1PREG_SPLIT_OFFSET_CAPTURE);
        
    $th_w $size[0];   //width of image in cm
        
    $th_h $size[2];   //height of image in cm
        
    $ratio 39;          //approx pixels/cm
        
    $tw = @round(($th_w/33),2);  //convert approx man height in ratio
        
    $th = @round(($th_w/33),2);
        
    //$th_name = $filename;
        
    $tws = @round($tw*$ratio,0); //convert cm to pixel
        
    $ths = @round($th*$ratio,0);
         
    exec("$imagemagickPath/convert -geometry ".$tws."x".$ths.$filename $th_name"); 
         
    $img "<img src=$th_name>";
         echo 
    "$img";
        
    ?>

  2. #2
    Free Geek computerages's Avatar
    Join Date
    Oct 2004
    Location
    /dev/null
    Posts
    1,071
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you please what are you trying to do?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •