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

Notification

Icon
Error

Options
Go to last post Go to first unread
bma  
#1 Posted : Monday, June 27, 2016 9:25:14 AM(UTC)
bma

Rank: Member

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

Thanks: 8 times
Hello,

When I convert the picture attached (bmp) to TGA and then to bmp again, the image becomes defective.

Link to file:

https://www.dropbox.com/...4VrudSbchKYR3xOC-Na?dl=0

Code used:

Code:
public static void Main(string[] args)
{
	var image = File.ReadAllBytes(@"D:\4055.bmp");

	var tga = ExportToTga(image);
	var bmp = ExportToBmp(tga);

	File.WriteAllBytes(@"D:\img_exported.bmp", bmp);

}

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[] ExportToBmp(byte[] image)
{
	using (var bmpExported = new MemoryStream())
	using (var reader = ImageReader.Create(new MemoryStream(image)))
	using (var bitmap = reader.Frames[0].GetBitmap())
	{
		bitmap.Save(bmpExported, new BmpSettings());

		return bmpExported.GetBuffer();
	}
}

Thank you,

Kind regards

Fedor  
#2 Posted : Monday, June 27, 2016 8:13:12 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Guest
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Thank you for the problem report (Aurigma Bug #0022311).

We will fix it in the next release.

Best regards,

Fedor Skvortsov

thanks 1 user thanked Fedor for this useful post.
bma on 6/28/2016(UTC)
Fedor  
#3 Posted : Wednesday, July 27, 2016 6:36:30 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Guest
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Hi,

We released the new version 8.1.50 of Graphics Mill where we fixed the problem.

You can obtain it on our website or via the NuGet repository.

http://www.graphicsmill.com/downloads

Best regards,

Fedor Skvortsov

Users browsing this topic
Guest
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.