Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix png regressions #18990

Merged
merged 2 commits into from Jan 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion OpenRA.Game/Graphics/Sheet.cs
Expand Up @@ -103,7 +103,7 @@ public Png AsPng(TextureChannel channel, IPalette pal)
for (var i = 0; i < Palette.Size; i++)
palColors[i] = pal.GetColor(i);

return new Png(plane, SpriteFrameType.Bgra32, Size.Width, Size.Height, palColors);
return new Png(plane, SpriteFrameType.Indexed8, Size.Width, Size.Height, palColors);
}

public void CreateBuffer()
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Game/Map/Map.cs
Expand Up @@ -779,7 +779,7 @@ public byte[] SavePreview()
}
}

var png = new Png(minimapData, SpriteFrameType.Bgra32, bitmapWidth, height);
var png = new Png(minimapData, SpriteFrameType.Rgba32, bitmapWidth, height);
return png.Save();
}

Expand Down