While technically users can get access to all image properties through the rawValue properties, it would be good to have all CGImageProperties broken out into type safe accessors, as well as any relevant helpers that coalesce different sources (TIFF vs GIF vs PNG etc) into a simple getter.
Additionally, we should consider making the property types specific to the image container or each contained image. Many, if not most properties are only ever available on one or the other, such as size (image only), file size (container only) and orientation (image only). By limiting the types, it can be much more obvious how to get access to certain information.
While technically users can get access to all image properties through the
rawValue
properties, it would be good to have all CGImageProperties broken out into type safe accessors, as well as any relevant helpers that coalesce different sources (TIFF vs GIF vs PNG etc) into a simple getter.Additionally, we should consider making the property types specific to the image container or each contained image. Many, if not most properties are only ever available on one or the other, such as size (image only), file size (container only) and orientation (image only). By limiting the types, it can be much more obvious how to get access to certain information.