mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 21:13:23 -07:00
THis fixes an exception when Greenshot is used via wine.
This commit is contained in:
parent
5b29eebd37
commit
633b31ec29
1 changed files with 33 additions and 24 deletions
|
@ -1374,6 +1374,10 @@ namespace GreenshotPlugin.Core {
|
|||
// Make sure both images have the same resolution
|
||||
newImage.SetResolution(sourceImage.HorizontalResolution, sourceImage.VerticalResolution);
|
||||
}
|
||||
|
||||
// In WINE someone getting the PropertyItems doesn't work
|
||||
try
|
||||
{
|
||||
// Clone property items (EXIF information etc)
|
||||
foreach (var propertyItem in sourceImage.PropertyItems)
|
||||
{
|
||||
|
@ -1381,11 +1385,16 @@ namespace GreenshotPlugin.Core {
|
|||
{
|
||||
newImage.SetPropertyItem(propertyItem);
|
||||
}
|
||||
catch (Exception innerEx)
|
||||
{
|
||||
Log.Warn("Problem cloning a propertyItem.", innerEx);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Warn("Problem cloning a propertyItem.", ex);
|
||||
}
|
||||
}
|
||||
return newImage;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue