mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
This commit is contained in:
committed by
GitHub
parent
b6affde530
commit
d39c4121a9
@@ -104,7 +104,15 @@ namespace ImageResizer.Models
|
||||
}
|
||||
}
|
||||
|
||||
metadata = newMetadata;
|
||||
if (newMetadata.IsMetadataObjectValid())
|
||||
{
|
||||
metadata = newMetadata;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Seems like we build an invalid metadata object. ImageResizer will fail when trying to write the image to disk. We discard all metadata to be able to save the image.
|
||||
metadata = null;
|
||||
}
|
||||
}
|
||||
catch (ArgumentException ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user