pinterest / PINRemoteImage

A thread safe, performant, feature rich image fetcher
Apache License 2.0
4.01k stars 511 forks source link

Add categories for alternative image types that can be decoded using registered custom decoders #602

Open brandonli-google opened 3 years ago

brandonli-google commented 3 years ago

This establishes a general pattern in order to register additional image decoders that can handle image formats not natively supported on iOS/MacOS

Upstreamed contribution from Google's fork of PINRemoteImage. Our immediate use case was for SVG image support using internal SVG decoding libraries

This PR only introduces the protocols -- our immediate use case was for inlined image bytes and thus no changes were made yet to PINImage+DecodedImage -- but we plan to add additional support for remote images and contribute that change back to this Github later this year

See https://github.com/TextureGroup/Texture/pull/2011 for context on where this change is used