Browse our Products

Aspose.Imaging for .NET 25.4 - Release notes

##Release notice From Aspose.Imaging.25.05, VectorRasterizationOptions class does not derive from ImageOptionsBase lcass. It is done in order to simplify and clarify VectorRasterizationOptions class API, since members derived from ImageOptionsBase are not used during image processing.

Competitive features:

  • Auto adjustment of image brightness
KeySummaryCategory
IMAGINGNET-7515Auto adjustment of image brightnessFeature
IMAGINGNET-7497Cannot load the DCM imageEnhancement
IMAGINGNET-7480Cannot convert the CMX image to JPG formatEnhancement

Public API changes:

Added APIs:

Field/Enum Aspose.Imaging.Image.ImageOperation.HistogramNormalization

Method Aspose.Imaging.RasterCachedImage.NormalizeHistogram

Method Aspose.Imaging.RasterCachedMultipageImage.NormalizeHistogram

Method Aspose.Imaging.RasterImage.NormalizeHistogram

Removed APIs:

Usage Examples:

IMAGINGNET-7515 Auto adjustment of image brightness

### Example
The images, which appear dull and lack sufficient brightness due to an underutilized color range, can have their perceived quality significantly improved by applying a histogram normalization filter. This technique adjusts the image to fully utilize the entire available color spectrum, enhancing both contrast and visual appeal. 

To further enhance the contrast of the image, you can utilize the AdjustContrast(float contrast) method, where the Contrast value ranges from -100 to 100. This allows for fine-tuned control over the image's contrast, enabling both subtle and dramatic improvements as needed.

 cpp
string inputFilePath = "input.png";
string outputFilePath = "output.png";
string outputFilePath2 = "output2.png";
using (RasterImage image = (RasterImage)Image.Load(inputFilePath))
{
	image.NormalizeHistogram();
	image.Save(outputFilePath);
	image.AdjustContrast(30);
	image.Save(outputFilePath2);
}

IMAGINGNET-7497 Cannot load the DCM image

cpp
using (var image = Image.Load("00506.dcm"))
{
    image.Save("00506.dcm.jpg");
}

IMAGINGNET-7480 Cannot convert the CMX image to JPG format

cpp
using (Image image = Image.Load("saffah khan cmx.cmx"))
{
    image.Save("saffah khan cmx.cmx.jpg", new JpegOptions() {
          VectorRasterizationOptions = new CmxRasterizationOptions() { TextRenderingHint = TextRenderingHint.SingleBitPerPixel, SmoothingMode = SmoothingMode.AntiAlias, Positioning = PositioningTypes.Relative }
 });
}