Created
May 12, 2025 13:36
-
-
Save conholdate-gists/1a84bf2e1ff4f9dce9b8aa30d5702225 to your computer and use it in GitHub Desktop.
Flip Images in Java | Flip Images Horizontally or Vertically
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load image | |
com.aspose.imaging.RasterImage image = (com.aspose.imaging.RasterImage) com.aspose.imaging.Image.load("image.png"); | |
// Flip the image horizontally | |
image.rotateFlip(com.aspose.imaging.RotateFlipType.RotateNoneFlipX); | |
// Save the flipped image | |
image.save("flipped-horizontal.png"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load image | |
com.aspose.imaging.RasterImage image = (com.aspose.imaging.RasterImage) com.aspose.imaging.Image.load("image.png"); | |
// Flip the image both horizontally and vertically | |
image.rotateFlip(com.aspose.imaging.RotateFlipType.RotateNoneFlipXY); | |
// Save the flipped image | |
image.save("flipped-both.png"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load image | |
com.aspose.imaging.RasterImage image = (com.aspose.imaging.RasterImage) com.aspose.imaging.Image.load("image.png"); | |
// Flip the image vertically | |
image.rotateFlip(com.aspose.imaging.RotateFlipType.RotateNoneFlipY); | |
// Save the vertically flipped image | |
image.save("flipped-vertical.png"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment