Skip to content

Fix the compatible for libavif 1.0.4 version #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "SDWebImage/SDWebImage" "5.0.2"
github "SDWebImage/SDWebImage" "5.1.0"
github "SDWebImage/libaom-Xcode" "1.0.1"
github "SDWebImage/libavif-Xcode" "0.1.3"
github "SDWebImage/libavif-Xcode" "0.1.4"
20 changes: 10 additions & 10 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
PODS:
- libaom (1.0.1)
- libavif (0.1.3):
- libavif (0.1.4):
- libaom (>= 1.0.1)
- SDWebImage (5.0.2):
- SDWebImage/Core (= 5.0.2)
- SDWebImage/Core (5.0.2)
- SDWebImageAVIFCoder (0.1.0):
- libavif (>= 0.1.3)
- SDWebImage (5.1.0):
- SDWebImage/Core (= 5.1.0)
- SDWebImage/Core (5.1.0)
- SDWebImageAVIFCoder (0.2.0):
- libavif (~> 0.1.4)
- SDWebImage (~> 5.0)

DEPENDENCIES:
Expand All @@ -24,10 +24,10 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
libaom: 1e48c68559b8d6191c1a9f266e0bee83b2dd21fd
libavif: b6de15e6a91a347806b2fcc1fccd471c821f6d6a
SDWebImage: 6764b5fa0f73c203728052955dbefa2bf1f33282
SDWebImageAVIFCoder: 1e80598038f37e20a83a7a790cb192e0b362a557
libavif: 4f94ed672d45d6651ee0f784f5faf11b95449716
SDWebImage: fb387001955223213dde14bc08c8b73f371f8d8f
SDWebImageAVIFCoder: ec08ff2cf12552223b51b7253c8201d264ecbbac

PODFILE CHECKSUM: cb60778bff8fb5ce4fbc8792f6079317b7a897be

COCOAPODS: 1.6.1
COCOAPODS: 1.7.5
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## What's for

This is a [SDWebImage](https://github.com/rs/SDWebImage) coder plugin to add [AV1 Image File Format (AVIF)](https://aomediacodec.github.io/av1-avif/) support. Which is built based on the open-sourced [libavif](https://github.com/joedrago/avif) codec.
This is a [SDWebImage](https://github.com/rs/SDWebImage) coder plugin to add [AV1 Image File Format (AVIF)](https://aomediacodec.github.io/av1-avif/) support. Which is built based on the open-sourced [libavif](https://github.com/AOMediaCodec/libavif) codec.

This AVIF coder plugin currently support AVIF still image **decoding**. Including alpha channel, as well as 10bit/12bit HDR images.

Expand Down Expand Up @@ -92,7 +92,7 @@ SDWebImageAVIFCoder is available under the MIT license. See the LICENSE file for

## Thanks

+ [libavif](https://github.com/joedrago/avif)
+ [libavif](https://github.com/AOMediaCodec/libavif)
+ [aom](https://aomedia.googlesource.com/aom/)
+ [AVIFQuickLook](https://github.com/dreampiggy/AVIFQuickLook)
+ [avif.js](https://github.com/Kagami/avif.js)
Expand Down
2 changes: 1 addition & 1 deletion SDWebImageAVIFCoder.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ Which is built based on the open-sourced libavif codec.
s.source_files = 'SDWebImageAVIFCoder/Classes/**/*', 'SDWebImageAVIFCoder/Module/SDWebImageAVIFCoder.h'

s.dependency 'SDWebImage', '~> 5.0'
s.dependency 'libavif', '>= 0.1.3'
s.dependency 'libavif', '~> 0.1.4'
end
3 changes: 3 additions & 0 deletions SDWebImageAVIFCoder/Classes/SDImageAVIFCoder.m
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ - (nullable CGImageRef)sd_createAVIFImageWithData:(nonnull NSData *)data CF_RETU
return nil;
}

// use RGB instead of YUV
avifImageYUVToRGB(avif);

int width = avif->width;
int height = avif->height;
BOOL hasAlpha = avif->alphaPlane != NULL;
Expand Down