We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Reading a Byte Array


I have a Byte Array of an image.

How can I load it into Aspose so I can change its Gamma?

Thank you.

Hi Jimmie,

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.


byte[] bytes = System.IO.File.ReadAllBytes(sourceFilePath);
using (MemoryStream stream = new MemoryStream(bytes))
using (RasterImage image = (RasterImage)Image.Load(stream))