This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Converted image from TGA is white.

bma#30916
Hello,

If I try to convert any image to TGA using graphics mill and then convert the new exported TGA image to another format like JPEG, the image exported is all White. Could you please, provide me any information about this ?

Code Snippet

static void Main(string[] args)
{
	var image = File.ReadAllBytes(@"D:\img_test.jpg");

	var tga = ExportToTga(image);
	var jpeg = ExportToJpeg(tga);

	File.WriteAllBytes(@"D:\img_exported.jpeg", jpg);
}

private static byte[] ExportToTga(byte[] image)
{
	using (var tgaExported = new MemoryStream())
	using (var reader = ImageReader.Create(new MemoryStream(image)))
	using (var writer = new TgaWriter(tgaExported))
	{
		writer.Compression = CompressionType.Rle;
		writer.ReducedPrecision = true;

		Pipeline.Run(reader + writer);

		return tgaExported.GetBuffer();
	}
}

private static byte[] ExportToJpeg(byte[] image)
{
	using (var jpegExported = new MemoryStream())
	using (var reader = ImageReader.Create(new MemoryStream(image)))
	using (var bitmap = reader.Frames[0].GetBitmap())
	{
		bitmap.Save(jpegExported, new JpegSettings { Quality = 85 });

		return jpegExported.GetBuffer();
	}
}


Graphics Mill version: 8.1.14

Kind regards

Attachments

Fedor#30920
We have reproduced the problem (Aurigma Bug #21888). You can expect the fix within 1-2 months.
bma#30922
OK! Thank You!

Regards
Fedor#31005
The bug was fixed in the recently released version 8.1.40.