Thank you for considering Aspose APIs, and welcome to Aspose.Imaging support forum.
Please check the following piece of code that reads the image from an array of bytes and performs the Gamma correction to save the results on the disk.
Please give the code a try on your side. In case you face any difficulty or have more questions, please feel free to contact us back.
C#
byte[] bytes = System.IO.File.ReadAllBytes(sourceFilePath); using (MemoryStream stream = new MemoryStream(bytes))
{ using (RasterImage image = (RasterImage)Image.Load(stream))
{
image.AdjustGamma(0.5f);
image.Save(destinationFilePath);
}
}
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.