libgdiplus icon indicating copy to clipboard operation
libgdiplus copied to clipboard

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

Open MBakirci opened this issue 5 years ago • 2 comments

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

MBakirci avatar Jan 07 '21 13:01 MBakirci

Can you share your image

hughbe avatar Jan 07 '21 13:01 hughbe

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

MBakirci avatar Jan 07 '21 13:01 MBakirci