Skip to content

Commit

Permalink
feat: add avif
Browse files Browse the repository at this point in the history
  • Loading branch information
richerfu committed Mar 28, 2024
1 parent 058c6b3 commit 14ed92d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .vitepress/Ecosystem.mts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const EcosystemSideBar: DefaultTheme.SidebarItem[] = [
{ text: "jsonwebtoken", link: "/ecosystem/package/jsonwebtoken" },
{ text: "snappy", link: "/ecosystem/package/snappy" },
{ text: "xxhash", link: "/ecosystem/package/xxhash" },
{text: 'image',link: '/ecosystem/package/image'}
{ text: "image", link: "/ecosystem/package/image" },
],
},
{
Expand All @@ -30,6 +30,7 @@ export const EcosystemSideBar: DefaultTheme.SidebarItem[] = [
{ text: "OpenSSL", link: "/ecosystem/third/openssl" },
{ text: "cURL", link: "/ecosystem/third/curl" },
{ text: "MMKV", link: "/ecosystem/third/mmkv" },
{ text: "avif", link: "/ecosystem/third/avif" },
],
},
];
24 changes: 24 additions & 0 deletions src/ecosystem/third/avif.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
editLink: true
---

# AVIF

AVIF is a new image format based on AV1 video encoding. Compared with image formats such as JPEG and WEBP, it has a higher compression ratio and better picture details. And most importantly, it is free and open source, with no licensing fees.

The rust community also provides the corresponding crate [libavif-sys](https://github.com/njaard/libavif-rs), implemented based on [libavif](https://github.com/AOMediaCodec/libavif). The relevant openharmony adaptation has been submitted, you can refer to this [PR](https://github.com/njaard/libavif-rs/pull/99).

You can wait for the PR to merge or directly reference through git.

## Example

```toml
[dependencies]
libavif = { git = "https://github.com/southorange0929/libavif-rs.git", default-features = false, features = [
"codec-aom",
] }
```

## Tip

For the `x86_64-unknown-linux-ohos` target, you need to install `yasm` or `nasm` to support assembly compilation.

0 comments on commit 14ed92d

Please sign in to comment.