libgdiplus
libgdiplus copied to clipboard
.net core/ .Net 5: Property is not supported
Hi,
When I try to copy the properties of an Image object on docker and UNIX I get the following error: SetPropertyItem throw an exception with the message Property is not supported. On Windows there is no error.
A short snippet from my code:
var newImage = new Bitmap(newWidth, newHeight);
foreach (var propItem in image.PropertyItems) //https://docs.microsoft.com/en-us/dotnet/api/system.drawing.image.propertyitems?view=dotnet-plat-ext-5.0)
{
newImage.SetPropertyItem(propItem); // https://docs.microsoft.com/en-us/dotnet/api/system.drawing.image.setpropertyitem?view=dotnet-plat-ext-5.0
}
edit: found the following issue thread, https://github.com/dotnet/runtime/issues/46410
Can you share your image
Can you share your image
All images(JPG, PNG, GIF etc) I tried has this. An example image I tried a lot:
