Aspose.Imaging for .NET 24.8 (MSI installer) brings significant enhancements to your image processing toolkit. This update empowers you with new features, such as remote image loading, and optimizes your image-handling workflows.
Load Images Directly from URLs
Process images from web addresses without saving them locally and create a hassle-free image manipulation experience for your users with the latest .NET imaging library release. This code sample illustrates the feature usage.
using (var image = Image.Load("https://docs.aspose.com/imaging/net/home_1.png"))
{
Assert.AreEqual(image.FileFormat, FileFormat.Png);
}
Source*
Enhanced TIFF Support
You can reliably save and manipulate multi-frame TIFF images in your C# and VB.NET applications and enhance your solutions seamlessly. Check out the following code example to learn how to use this functionality in C#.
MemoryStream ms = new MemoryStream();
TiffOptions tiffOptions = new TiffOptions(Aspose.Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.TiffLzwRgba);
tiffOptions.Source = new Aspose.Imaging.Sources.StreamSource(ms);
int[] pixels = new int[2500];
TiffImage image = (TiffImage)Image.Create(tiffOptions, 50, 50);
image.SaveArgb32Pixels(image.Bounds, pixels);
image.Save();
for (int i = 0; i < 7; ++i)
{
ImageOptionsBase newImageOptions = tiffOptions.Clone();
newImageOptions.Source = new Aspose.Imaging.Sources.StreamSource(new MemoryStream());
using (TiffImage newTiffImage = (TiffImage)Image.Create(newImageOptions, 50, 50))
{
newTiffImage.SaveArgb32Pixels(image.Bounds, pixels);
foreach (TiffFrame frame in newTiffImage.Frames)
{
TiffFrame frameCopy = TiffFrame.CopyFrame(frame);
image.AddFrame(frameCopy);
}
}
}
image.Save();
Source*
Improved PNG Creation
Aspose.Imaging for .NET 24.8 enables the generation of high-quality 16-bit PNG images with precision. The following C# code example highlights how to use this feature.
var outputPath = "@output64Bit.png";
var createOptions = new PngOptions
{
BitDepth = 16,
ColorType = PngColorType.TruecolorWithAlpha,
CompressionLevel = 9,
FilterType = PngFilterType.Sub,
Progressive = true
};
using (var pngImage = new PngImage(createOptions, 100, 100))
{
var graphics = new Graphics(pngImage);
var gradientBrush = new LinearGradientBrush(
new Point(0, 0),
new Point(pngImage.Width, pngImage.Height),
Color.Blue,
Color.Transparent);
graphics.FillRectangle(gradientBrush, pngImage.Bounds);
pngImage.Save(outputPath);
}
image.Save();
Source*
Accurate PDF Conversion
Maintain correct page sizes when converting images to PDF using this C# library version. Enjoy highly accurate PDF conversions and create professional looking PDF documents from images in C#.
var InputFile = "AV Seite 2.jpeg";
var outputFile = "AV Seite 2.jpeg.pdf";
using (var image = Image.Load(InputFile, new Aspose.Imaging.LoadOptions()))
{
using (var exportOptions = new PdfOptions())
{
exportOptions.PdfDocumentInfo = new PdfDocumentInfo();
//exportOptions.UseOriginalImageResolution = true;
image.Save(outputFile, exportOptions);
}
}
Source*
Developers can get precise horizontal and vertical DPI values for raster images using this feature enhancement, as showcased in this coding sample.
const string source = "problematic.jpg";
using (RasterImage image = (RasterImage)Image.Load(source))
{
Console.WriteLine($"Horizontal resolution: {image.HorizontalResolution}, Vertical resolution: {image.VerticalResolution}");
}
Source*
Robust EPS Conversion
The C# image processing API allows successfully converting EPS files to other image formats. With this update, you can enhance the portfolio of your .NET image conversion applications. Here is how to use this feature.
var input = @"input.eps";
using var image = Image.Load(input);
image.Save(input + ".svg");
Source*
You can view the list of all new features, enhancements, and bug fixes introduced in this release by visiting Aspose.Imaging for .NET 24.8 Release Notes.