@@ -12,16 +12,16 @@ internal sealed class ExifWriter
1212{
1313 private const int HeaderSize = 2 + 2 + 4 + 4 ;
1414
15- private readonly ExifParts _allowedParts ;
15+ private readonly ExifIfds _allowedIfds ;
1616
17- public ExifWriter ( ExifParts allowedParts )
18- => _allowedParts = allowedParts ;
17+ public ExifWriter ( ExifIfds allowedIfds )
18+ => _allowedIfds = allowedIfds ;
1919
2020 public byte [ ] ? Write ( Collection < IExifValue > values )
2121 {
22- var ifdValues = GetPartValues ( values , ExifParts . IfdTags ) ;
23- var exifValues = GetPartValues ( values , ExifParts . ExifTags ) ;
24- var gpsValues = GetPartValues ( values , ExifParts . GpsTags ) ;
22+ var ifdValues = GetPartValues ( values , ExifIfds . Ifd0 ) ;
23+ var exifValues = GetPartValues ( values , ExifIfds . Exif ) ;
24+ var gpsValues = GetPartValues ( values , ExifIfds . Gps ) ;
2525
2626 RemoveOffsetValues ( ifdValues , ExifTag . SubIFDOffset , ExifTag . GPSIFDOffset ) ;
2727
@@ -297,19 +297,19 @@ private static void WriteSignedRational(MemoryStream stream, SignedRational valu
297297 stream . WriteBytes ( BitConverter . GetBytes ( value . Denominator ) ) ;
298298 }
299299
300- private Collection < IExifValue > GetPartValues ( Collection < IExifValue > values , ExifParts part )
300+ private Collection < IExifValue > GetPartValues ( Collection < IExifValue > values , ExifIfds ifd )
301301 {
302302 var result = new Collection < IExifValue > ( ) ;
303303
304- if ( ! EnumHelper . HasFlag ( _allowedParts , part ) )
304+ if ( ! EnumHelper . HasFlag ( _allowedIfds , ifd ) )
305305 return result ;
306306
307307 foreach ( var value in values )
308308 {
309309 if ( ! HasValue ( value ) )
310310 continue ;
311311
312- if ( ExifTags . GetPart ( value . Tag ) == part )
312+ if ( ExifTags . GetIfd ( value . Tag ) == ifd )
313313 result . Add ( value ) ;
314314 }
315315
0 commit comments