Need PHP Developer (Image resize script) ASAP

Discussion in 'Programming' started by morgano, Dec 2, 2009.

  1. #1
    Hi I need someone to help with a script. The skeleton function should look like this:

    function resize($image, $width=FALSE, $height=FALSE, $stretch=FALSE) {
    
    }
    PHP:
    -It needs to be able to resize an image based on input of just HEIGHT or just WIDTH or both HEIGHT + WIDTH.

    -If stretch is TRUE then the image can simply be resized without keeping its proportion. If stretch is false then the image should first resize to the closest dimension possible without losing proportion. Then the image needs to be cropped to fit the final height and width needed.

    -The script should preserve transparency in both GIF and PNG during resize or crop.

    If you can do this then send me a PM with a price and we can get to work ASAP :)
     
    morgano, Dec 2, 2009 IP
  2. travelmoth

    travelmoth Active Member

    Messages:
    153
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    It's not difficult...What's the meaning of "$image"? it's URL string(file path)? or image resource handle?
     
    travelmoth, Dec 2, 2009 IP
  3. parthiphp

    parthiphp Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    $size = $width.'x'.$height;
    $soucre = $imagename;
    $designation = $desginationimage
    $command = "convert $source -resize $size $designation";
    exec($command);

    its a simple resize

    somuch stretch option there. First you will try this. Any doubt reply me
     
    parthiphp, Dec 2, 2009 IP