Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
bma  
#1 Posted : Friday, March 4, 2016 9:42:35 AM(UTC)
bma

Rank: Member

Groups: Member
Joined: 1/12/2016(UTC)
Posts: 23

Thanks: 8 times
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

Code:
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

Edited by user Friday, March 4, 2016 9:43:50 AM(UTC)  | Reason: Not specified

bma attached the following image(s):
img_test.jpg
Fedor  
#2 Posted : Wednesday, March 9, 2016 4:06:28 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
We have reproduced the problem (Aurigma Bug #21888). You can expect the fix within 1-2 months.

Edited by user Wednesday, March 9, 2016 6:44:57 AM(UTC)  | Reason: Not specified

Best regards,

Fedor Skvortsov

bma  
#3 Posted : Wednesday, March 9, 2016 6:26:12 AM(UTC)
bma

Rank: Member

Groups: Member
Joined: 1/12/2016(UTC)
Posts: 23

Thanks: 8 times
OK! Thank You!

Regards

Fedor  
#4 Posted : Tuesday, June 7, 2016 1:20:27 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
The bug was fixed in the recently released version 8.1.40.
Best regards,

Fedor Skvortsov

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.