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
| import com.aspose.slides.ImageSaveOptions; | |
| import com.aspose.slides.Presentation; | |
| import com.aspose.slides.SaveFormat; | |
| public class PptxToJpeg { | |
| public static void main(String[] args) { | |
| // Path to the source PPTX file | |
| String sourcePath = "input.pptx"; | |
| // Output folder for JPEG images | |
| String outputFolder = "output/"; |
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
| using System; | |
| using System.IO; | |
| using Conholdate.Total.Slides; | |
| class Program | |
| { | |
| static void Main() | |
| { | |
| // Path to the source PPTX file | |
| string inputPath = "sample.pptx"; |
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
| // Convert PPT to JPG - Complete Code Example | |
| using System; | |
| using System.Drawing; | |
| using System.Drawing.Imaging; | |
| using Conholdate.Total.Slides; // Namespace for presentation handling | |
| namespace PptToJpgDemo | |
| { | |
| class Program | |
| { |
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
| import com.aspose.total.Image; | |
| import com.aspose.total.ImageLoadOptions; | |
| import com.aspose.total.ImageSaveOptions; | |
| import com.aspose.total.fileformats.png.PngOptions; | |
| public class PsdToPng { | |
| public static void main(String[] args) throws Exception { | |
| // Path to the source PSD file | |
| String sourcePath = "input.psd"; |
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 the image. | |
| com.aspose.imaging.RasterImage rasterImage = (com.aspose.imaging.RasterImage)com.aspose.imaging.Image.Load("image.png"); | |
| // Before cropping, the image should be cached for better performance. | |
| if (!rasterImage.isCached()) | |
| { | |
| rasterImage.cacheData(); | |
| } | |
| // Create an instance of Rectangle class with desired size and crop the image. |
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 an image in an instance of Image | |
| using (Image image = Image.Load("image.bmp")) | |
| { | |
| // Rotate the image | |
| image.RotateFlip(RotateFlipType.Rotate270FlipNone); | |
| // Save image | |
| image.Save("image-rotated.bmp"); | |
| } |
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 the input DWF file | |
| Image image = Image.Load("DWFtoPDF.dwf"); | |
| // Create an object of CadRasterizationOptions to set different properties | |
| CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions() | |
| { | |
| PageWidth = 1600, | |
| PageHeight = 1600, | |
| ContentAsBitmap = true |
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 | |
| using (Image image = Image.Load("aspose-logo.png")) | |
| { | |
| // Cache image data | |
| if (!image.IsCached) | |
| { | |
| image.CacheData(); | |
| } | |
| // Specify width and height |
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 an input JPG image | |
| var bytes = File.ReadAllBytes(@"C:\Files\Sample_JPG.jpg"); | |
| // Initialize an SVGDocument object | |
| var document = new SVGDocument(); | |
| // Create an image element | |
| var img = (SVGImageElement)document.CreateElementNS("http://www.w3.org/2000/svg", "image"); | |
| // Convert image to Base64 |
NewerOlder