Rotate and Flip an Image in PHP

Aspose.Imaging - Rotate and Flip an Image

To Rotate and Flip an Image using Aspose.Imaging Java for PHP, simply invoke RotateAndFlipImage module. Here you can see example code.

PHP Code

 # Load an existing image (of type bmp) in an instance of Image class

$image=new Image();

$image = $image->load($dataDir . "test.jpg");

$rotateFlipType=new RotateFlipType();

$image->rotateFlip($rotateFlipType->Rotate270FlipNone);

\# Save the image to disk

$image->save($dataDir . "RotateFlip.jpg");

\# Display Status.

print "RotateFlip image successfully!".PHP_EOL;

Download Running Code

Download Rotate and Flip an Image (Aspose.Imaging) from any of the below mentioned social coding sites: