SBSDKImageMetadata

@interface SBSDKImageMetadata : NSObject

Encapsulates image metadata, e.g. EXIF, TIFF, JFIF in a convenient way. Use SBSDKImageMetadataProcessor to extract metadata from and inject changed metadata into image data.

  • The raw metadata dictionary as it gets extracted from CGImageSourceCopyPropertiesAtIndex. Readonly.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nonnull) NSDictionary<NSString *, NSObject *> *metadataDictionary;

    Swift

    var metadataDictionary: [String : NSObject] { get }
  • The orientation flag of the image.

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger orientation;

    Swift

    var orientation: UInt { get set }
  • The width of the image in pixels.

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger imageWidth;

    Swift

    var imageWidth: UInt { get set }
  • The height of the image in pixels.

    Declaration

    Objective-C

    @property (nonatomic) NSUInteger imageHeight;

    Swift

    var imageHeight: UInt { get set }
  • The title of the image.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSString *title;

    Swift

    var title: String? { get set }
  • The longitude of the location where the image was captured.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSNumber *longitude;

    Swift

    var longitude: NSNumber? { get set }
  • The latitude of the location where the image was captured.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSNumber *latitude;

    Swift

    var latitude: NSNumber? { get set }
  • The altitude of the location where the image was captured.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSNumber *altitude;

    Swift

    var altitude: NSNumber? { get set }
  • The date of when the image was captured.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSDate *originalDate;

    Swift

    var originalDate: Date? { get set }
  • The date of when the image was digitized.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSDate *digitalizationDate;

    Swift

    var digitalizationDate: Date? { get set }
  • The model of the lens used to capture the image. Readonly.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSString *lensModel;

    Swift

    var lensModel: String? { get }
  • The manufacturer of the lens used to capture the image. Readonly.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSString *lensMaker;

    Swift

    var lensMaker: String? { get }
  • The real focal length of the lens used to capture the image. Measured in millimeters. Readonly.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSNumber *focalLength;

    Swift

    var focalLength: NSNumber? { get }
  • The 35mm equivalent focal length of the lens used to capture the image. Measured in millimeters. Readonly.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSNumber *focalLength35mm;

    Swift

    var focalLength35mm: NSNumber? { get }
  • The f-stop number or aperture of the lens used to capture the image. Readonly.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSNumber *aperture;

    Swift

    var aperture: NSNumber? { get }
  • The duration the sensor was exposed during capturing the image. Equals to 1.0 / shutter speed. Readonly.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSNumber *exposureTime;

    Swift

    var exposureTime: NSNumber? { get }
  • The ISO value used to capture the image. Readonly.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSNumber *ISOValue;

    Swift

    var isoValue: NSNumber? { get }
  • Designated initializer.

    • - parameter: metadata Takes the the raw metadata dictionary as it gets extracted from CGImageSourceCopyPropertiesAtIndex.
    • - returns: A new SBSDKImageMetadata object or nil, if the metadata dictionary does not contain valid metadata.

    Declaration

    Objective-C

    - (nullable instancetype)initWithMetadataDictionary:
        (nonnull NSDictionary<NSString *, NSObject *> *)metadata;

    Swift

    init?(metadataDictionary metadata: [String : NSObject])
  • Removes location information from metadata dictionary.

    Declaration

    Objective-C

    - (void)removeLocationInformation;

    Swift

    func removeLocationInformation()