onevcat / APNGKit

High performance and delightful way to play with APNG format in iOS.
MIT License
2.21k stars 200 forks source link

Decoupling renderer from decoder #124

Closed onevcat closed 2 years ago

onevcat commented 2 years ago

This fixes #123

Added an APNGImageRenderer which is bound to the image view. It replaces the rendering part which was originally in APNGDecoder. By creating this new renderer type, we can decouple the image representation from the actually rendering process of the image. This allows a same APNGImage used in different image views, and there is no limitation on single, exclusion owner in the image.