Browse our Products

Aspose.Imaging for Java 25.4 - Release notes

Competitive features:

  • Auto adjustment of image brightness
KeySummaryCategory
IMAGINGJava-8926Auto adjustment of image brightnessFeature
IMAGINGJava-8935Cannot load the DCM imageEnhancement
IMAGINGJava-8934Cannot convert the CMX image to JPG formatEnhancement

Public API changes:

Added APIs:

Please see corresponding cumulative API changes for Aspose.Imaging for .NET 25.4 version

Removed APIs:

Please see corresponding cumulative API changes for Aspose.Imaging for .NET 25.4 version

Usage Examples:

IMAGINGJava-8935 Cannot load the DCM image

try (Image image = Image.load("00506.dcm"))
{
    image.save("00506.dcm.jpg");
}

IMAGINGJava-8934 Cannot convert the CMX image to JPG format

try (Image image = Image.load("saffah khan cmx.cmx"))
{
    image.save("saffah khan cmx.cmx.jpg", new JpegOptions() {{
          setVectorRasterizationOptions(new CmxRasterizationOptions() {{ 
				setTextRenderingHint(TextRenderingHint.SingleBitPerPixel);
				setSmoothingMode(SmoothingMode.AntiAlias);
				setPositioning(PositioningTypes.Relative); 
			}});
		}});
}

IMAGINGJava-8926 Auto adjustment of image brightness

### Example
Images that 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 fully, 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.


String inputFilePath = "input.png";
String outputFilePath = "output.png";
String outputFilePath2 = "output2.png";
try (RasterImage image = (RasterImage)Image.load(inputFilePath))
{
	image.normalizeHistogram();
	image.save(outputFilePath);
	image.adjustContrast(30);
	image.save(outputFilePath2);
}