Browse Source

minor

pull/1760/head
Ildar Khayrutdinov 5 years ago
parent
commit
7185a24baf
  1. 14
      src/ImageSharp/Metadata/Profiles/Exif/Values/ExifLong8Array.cs
  2. 14
      src/ImageSharp/Metadata/Profiles/Exif/Values/ExifNumberArray.cs

14
src/ImageSharp/Metadata/Profiles/Exif/Values/ExifLong8Array.cs

@ -26,16 +26,14 @@ namespace SixLabors.ImageSharp.Metadata.Profiles.Exif
{ {
get get
{ {
if (this.Value is null) if (this.Value is not null)
{ {
return ExifDataType.Long; foreach (ulong value in this.Value)
}
foreach (ulong value in this.Value)
{
if (value > uint.MaxValue)
{ {
return ExifDataType.Long8; if (value > uint.MaxValue)
{
return ExifDataType.Long8;
}
} }
} }

14
src/ImageSharp/Metadata/Profiles/Exif/Values/ExifNumberArray.cs

@ -19,16 +19,14 @@ namespace SixLabors.ImageSharp.Metadata.Profiles.Exif
{ {
get get
{ {
if (this.Value is null) if (this.Value is not null)
{ {
return ExifDataType.Short; foreach (Number value in this.Value)
}
foreach (Number value in this.Value)
{
if (value > ushort.MaxValue)
{ {
return ExifDataType.Long; if (value > ushort.MaxValue)
{
return ExifDataType.Long;
}
} }
} }

Loading…
Cancel
Save