ATProtoKit icon indicating copy to clipboard operation
ATProtoKit copied to clipboard

[Feature Request]: Complete `ATImageProcessable` Implementation

Open MasterJ93 opened this issue 1 year ago • 0 comments

Summary

No response

Pain points

ATImageProcessable is a helper protocol framework that tries to get images down to below the maximum size that the AT Protocol requires. Since The AT Protocol is more than just Bluesky, a framework is needed to make it more generic. This should act as an extension to any image frameworks (examples: UIImage for iOS; NSImage for macOS).

Considered Alternatives

No response

Is this a breaking change?

No

Library Examples

No response

Additional Context

Current goals:

  • [ ] Extend UIImage with convenience initializers that clone the applicable base initializers
  • [ ] Extend NSImage with convenience initializers that clone the applicable base initializers
  • [ ] Ensure the following methods have a default implementation:
    • [ ] convertToImageQuery(imagePath: String, altText: String?, targetFileSize: Int) -> ImageQuery?
    • [ ] stripMetadata(from image: ATImage) -> ATImage?
  • [ ] Support for JPEG images
  • [ ] Support for PNG images
  • [ ] Support for WEBP images

MasterJ93 avatar May 13 '24 08:05 MasterJ93