public function manipulateFrame($frameId, $rotateFlipMethod, $newWidth, $newHeight, $x, $y, $rectWidth, $rectHeight, $outPath)
    {

        if ($frameId == '')
            throw new Exception('Frame ID not specified');

        if ($rotateFlipMethod == '')
            throw new Exception('RotateFlip method not specified');

        if ($newWidth == '')
            throw new Exception('New width not specified');

        if ($newHeight == '')
            throw new Exception('New height not specified');

        if ($x == '')
            throw new Exception('X position not specified');

        if ($y == '')
            throw new Exception('Y position not specified');

        if ($rectWidth == '')
            throw new Exception('Width of cropping rectangle not specified');

        if ($rectHeight == '')
            throw new Exception('Height of cropping rectangle not specified');

        if ($outPath == '')
            throw new Exception('Output file not specified');

        //build URI
        $strURI = Product::$baseProductUri . '/imaging/' . $this->getFileName() . '/frames/' . $frameId . '?saveOtherFrames=false&rotateFlipMethod=' . $rotateFlipMethod . '&newWidth=' . $newWidth . '&newHeight=' . $newHeight . '&x=' . $x . '&y=' . $y . '&rectWidth=' . $rectWidth . '&rectHeight=' . $rectHeight . '&outPath=' . $outPath;

        //sign URI
        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');

        $v_output = Utils::validateOutput($responseStream);

        if ($v_output === '') {
            $folder = new Folder();
            $outputStream = $folder->GetFile($outPath);
            $outputPath = AsposeApp::$outPutLocation . $outPath;
            Utils::saveFile($outputStream, $outputPath);
            return $outputPath;
        } else
            return $v_output;
    }
public function manipulateFrame($frameId, $rotateFlipMethod, $newWidth, $newHeight, $x, $y, $rectWidth, $rectHeight, $outPath)
    {

        if ($frameId == '')
            throw new Exception('Frame ID not specified');

        if ($rotateFlipMethod == '')
            throw new Exception('RotateFlip method not specified');

        if ($newWidth == '')
            throw new Exception('New width not specified');

        if ($newHeight == '')
            throw new Exception('New height not specified');

        if ($x == '')
            throw new Exception('X position not specified');

        if ($y == '')
            throw new Exception('Y position not specified');

        if ($rectWidth == '')
            throw new Exception('Width of cropping rectangle not specified');

        if ($rectHeight == '')
            throw new Exception('Height of cropping rectangle not specified');

        if ($outPath == '')
            throw new Exception('Output file not specified');

        //build URI
        $strURI = Product::$baseProductUri . '/imaging/' . $this->getFileName() . '/frames/' . $frameId . '?saveOtherFrames=false&rotateFlipMethod=' . $rotateFlipMethod . '&newWidth=' . $newWidth . '&newHeight=' . $newHeight . '&x=' . $x . '&y=' . $y . '&rectWidth=' . $rectWidth . '&rectHeight=' . $rectHeight . '&outPath=' . $outPath;

        //sign URI
        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');

        $v_output = Utils::validateOutput($responseStream);

        if ($v_output === '') {
            $folder = new Folder();
            $outputStream = $folder->GetFile($outPath);
            $outputPath = AsposeApp::$outPutLocation . $outPath;
            Utils::saveFile($outputStream, $outputPath);
            return $outputPath;
        } else
            return $v_output;
    }
public function manipulateFrame ( $ frameId , $ rotateFlipMethod , $ newWidth , $ newHeight , $ x , $ y , $ rectWidth , $ rectHeight , $ outPath ) { if ( $ frameId == '' ) throw new Exception ( 'Frame ID not specified' ) ; if ( $ rotateFlipMethod == '' ) throw new Exception ( 'RotateFlip method not specified' ) ; if ( $ newWidth == '' ) throw new Exception ( 'New width not specified' ) ; if ( $ newHeight == '' ) throw new Exception ( 'New height not specified' ) ; if ( $ x == '' ) throw new Exception ( 'X position not specified' ) ; if ( $ y == '' ) throw new Exception ( 'Y position not specified' ) ; if ( $ rectWidth == '' ) throw new Exception ( 'Width of cropping rectangle not specified' ) ; if ( $ rectHeight == '' ) throw new Exception ( 'Height of cropping rectangle not specified' ) ; if ( $ outPath == '' ) throw new Exception ( 'Output file not specified' ) ; //build URI $ strURI = Product :: $ baseProductUri . '/imaging/' . $ this -> getFileName ( ) . '/frames/' . $ frameId . '?saveOtherFrames=false&rotateFlipMethod=' . $ rotateFlipMethod . '&newWidth=' . $ newWidth . '&newHeight=' . $ newHeight . '&x=' . $ x . '&y=' . $ y . '&rectWidth=' . $ rectWidth . '&rectHeight=' . $ rectHeight . '&outPath=' . $ outPath ; //sign URI $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'GET' , '' , '' ) ; $ v_output = Utils :: validateOutput ( $ responseStream ) ; if ( $ v_output === '' ) { $ folder = new Folder ( ) ; $ outputStream = $ folder -> GetFile ( $ outPath ) ; $ outputPath = AsposeApp :: $ outPutLocation . $ outPath ; Utils :: saveFile ( $ outputStream , $ outputPath ) ; return $ outputPath ; } else return $ v_output ; }
Manipulate a Frame and Save the Modified Frame Along with Unmodified Frames.

@param integer $frameId Number of frame.
@param string $rotateFlipMethod RotateFlip method.
@param integer $newWidth New width of the scaled image.
@param integer $newHeight New height of the scaled image.
@param integer $x X position of start point for cropping rectangle.
@param integer $y Y position of start point for cropping rectangle.
@param integer $rectWidth Width of cropping rectangle.
@param integer $rectHeight Height of cropping rectangle.
@param string $outPath Path to updated file.

@return string Returns the file path.
@throws Exception
Manipulate a Frame and Save the Modified Frame Along with Unmodified Frames .