mono / libgdiplus

C-based implementation of the GDI+ API
http://www.mono-project.com/
MIT License
329 stars 171 forks source link

.net core/ .Net 5: Property is not supported #680

Open MBakirci opened 3 years ago

MBakirci commented 3 years ago

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

hughbe commented 3 years ago

Can you share your image

MBakirci commented 3 years ago

Can you share your image

All images(JPG, PNG, GIF etc) I tried has this. An example image I tried a lot: pumps_flygt_pumpproductdetail_secondary_n3400_528x302