Browse Source

Revert some changes

pull/1760/head
Ildar Khayrutdinov 5 years ago
parent
commit
e55a63ac64
  1. 4
      src/ImageSharp/Metadata/Profiles/Exif/ExifReader.cs
  2. 10
      src/ImageSharp/Metadata/Profiles/Exif/Values/ExifNumberArray.cs

4
src/ImageSharp/Metadata/Profiles/Exif/ExifReader.cs

@ -394,7 +394,7 @@ namespace SixLabors.ImageSharp.Metadata.Profiles.Exif
}
else
{
object value = this.ConvertValue(dataType, offsetBuffer.Slice(0, (int)size), numberOfComponents > 1 || exifValue.IsArray);
object value = this.ConvertValue(dataType, offsetBuffer.Slice(0, (int)size), numberOfComponents > 1);
this.Add(values, exifValue, value);
}
}
@ -477,7 +477,7 @@ namespace SixLabors.ImageSharp.Metadata.Profiles.Exif
}
else
{
object value = this.ConvertValue(dataType, offsetBuffer.Slice(0, (int)size), numberOfComponents > 1 || exifValue.IsArray);
object value = this.ConvertValue(dataType, offsetBuffer.Slice(0, (int)size), numberOfComponents > 1);
this.Add(values, exifValue, value);
}
}

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

@ -49,18 +49,18 @@ namespace SixLabors.ImageSharp.Metadata.Profiles.Exif
return this.SetSingle(val);
case uint val:
return this.SetSingle(val);
case ushort val:
return this.SetSingle(val);
case short val:
return this.SetSingle(val);
case uint[] array:
return this.SetArray(array);
case ushort val:
return this.SetSingle(val);
case int[] array:
return this.SetArray(array);
case ushort[] array:
case uint[] array:
return this.SetArray(array);
case short[] array:
return this.SetArray(array);
case ushort[] array:
return this.SetArray(array);
}
return false;

Loading…
Cancel
Save