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
|
|
|
|
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
|
1 user thanked Fedor for this useful post.
|
|
|
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)
|
|
Best regards, Fedor Skvortsov
|
|
|
|
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.