Closed filipnavara closed 4 years ago
Thank you. Looks better. Now the icons have a white background. In Windows background transparent Here is an example toolbar from windows Here mono master & libgdiplus master Here mono master & libgdiplus master with this patch Here res file with fifth icon in the last screenshot Plans.zip I get it from the resource with the following code
Bitmap bmp =
new Bitmap(
Assembly.GetExecutingAssembly().GetManifestResourceStream(
"MyProject.Images.Plans.bmp"));
var rect = new Rectangle(0, 0, bmp.Height, bmp.Height);
return bmp.Clone(rect, bmp.PixelFormat);
It has Color depth = 4 The fourth icon in the last screenshot has a color depth = 8 both bmp format icons
@sancheolz It could be related to the FIXME in the code: https://github.com/mono/libgdiplus/blob/8411dce64028204a84d16dc001e6c057fa5ffb3d/src/imageattributes.c#L341-L344 or entirely different issue altogether.
These code paths definitely needs more testing and test coverage. This particular PR fixes just a regression from PR #567.
Fixes https://github.com/mono/mono/issues/8514