Browse Source

Remove setting XMP profile twice

pull/1553/head
Brian Popow 5 years ago
parent
commit
6ba3f101fa
  1. 12
      src/ImageSharp/Formats/Tiff/TiffDecoderMetadataCreator.cs

12
src/ImageSharp/Formats/Tiff/TiffDecoderMetadataCreator.cs

@ -40,15 +40,6 @@ namespace SixLabors.ImageSharp.Formats.Tiff
{ {
ImageFrame<TPixel> frame = frames[i]; ImageFrame<TPixel> frame = frames[i];
ImageFrameMetadata frameMetaData = frame.Metadata; ImageFrameMetadata frameMetaData = frame.Metadata;
if (frameMetaData.XmpProfile == null)
{
IExifValue<byte[]> val = frameMetaData.ExifProfile.GetValue(ExifTag.XMP);
if (val != null)
{
frameMetaData.XmpProfile = val.Value;
}
}
if (imageMetaData.IptcProfile == null && TryGetIptc(frameMetaData.ExifProfile.Values, out byte[] iptcBytes)) if (imageMetaData.IptcProfile == null && TryGetIptc(frameMetaData.ExifProfile.Values, out byte[] iptcBytes))
{ {
imageMetaData.IptcProfile = new IptcProfile(iptcBytes); imageMetaData.IptcProfile = new IptcProfile(iptcBytes);
@ -145,8 +136,5 @@ namespace SixLabors.ImageSharp.Formats.Tiff
return false; return false;
} }
private static TiffBitsPerPixel GetBitsPerPixel(TiffFrameMetadata firstFrameMetaData)
=> (TiffBitsPerPixel)firstFrameMetaData.BitsPerPixel;
} }
} }

Loading…
Cancel
Save