{"id":41645380,"url":"https://github.com/awxkee/avif-coder","last_synced_at":"2026-01-24T15:20:20.869Z","repository":{"id":113136440,"uuid":"582928165","full_name":"awxkee/avif-coder","owner":"awxkee","description":"AVIF/HEIC coder for Android, Kotlin, Java","archived":false,"fork":false,"pushed_at":"2025-08-17T15:50:29.000Z","size":404598,"stargazers_count":86,"open_issues_count":3,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-26T01:39:03.321Z","etag":null,"topics":["android","av1","av1-codec","avif","avif-decoder","avif-encoder","decoder","encoder","heic","heif","java-android","kotlin","kotlin-android","photos"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/awxkee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"awxkee"}},"created_at":"2022-12-28T09:03:13.000Z","updated_at":"2025-10-24T08:33:02.000Z","dependencies_parsed_at":"2024-10-16T21:42:43.612Z","dependency_job_id":"f2a4cd59-e359-4a81-b4a8-fb350e7a7e1c","html_url":"https://github.com/awxkee/avif-coder","commit_stats":null,"previous_names":[],"tags_count":80,"template":false,"template_full_name":null,"purl":"pkg:github/awxkee/avif-coder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awxkee%2Favif-coder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awxkee%2Favif-coder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awxkee%2Favif-coder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awxkee%2Favif-coder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awxkee","download_url":"https://codeload.github.com/awxkee/avif-coder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awxkee%2Favif-coder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28730318,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","av1","av1-codec","avif","avif-decoder","avif-encoder","decoder","encoder","heic","heif","java-android","kotlin","kotlin-android","photos"],"created_at":"2026-01-24T15:20:20.323Z","updated_at":"2026-01-24T15:20:20.843Z","avatar_url":"https://github.com/awxkee.png","language":"C++","funding_links":["https://github.com/sponsors/awxkee"],"categories":[],"sub_categories":[],"readme":"# AVIF/HEIF Coder for Android 24+\n\nLibrary provides simple interface to decode or encode ( create ) AVIF and HEIF images for Android\nVery fast and convinient to use AVIF in android apps with api version 24+. Based on libheif, libde265, libx265, libyuv, libaom and libdav1d\n\nCorrectly handles ICC, and color profiles and HDR images.\nFully supports HDR images, 10, 12 bit. Preprocess image in tile to increase speed.\nExtremly fast in decoding large HDR images or just large images.\nThe most featured AVIF, HEIF library in android.\nSupported decoding in all necessary pixel formats in Android and avoids android decoding bugs.\n\n# Usage example\n\n```kotlin\n// May decode AVIF(AV1) and HEIC (HEVC) images, HDR images supported\nval bitmap: Bitmap = HeifCoder().decode(buffer) // Decode avif from ByteArray\nval bytes: ByteArray = HeifCoder().encodeAvif(decodedBitmap) // Encode Bitmap to AVIF\nval bytes = HeifCoder().encodeHeic(bitmap) // Encode Bitmap to HEIC / Supports HDR in RGBA_F16, RGBA_1010102, HARDWARE\n// Check if image is valid AVIF(AV1) image\nval isAvif = HeifCoder().isAvif(byteArray)\n// Check if image is valid HEIF(HEVC) image\nval isHeif = HeifCoder().isHeif(byteArray)\n// Check if image is AVIF or HEIF, just supported one\nval isImageSupported = HeifCoder().isSupportedImage(byteArray)\n// Get image size ( this call never throw)\nval imageSize: Size? = HeifCoder().getSize(byteArray)\n// Decode AVIF or HEIF in sample size if needed\nval bitmap: Bitmap = decodeSampled(byteArray, scaledWidth, scaledHeight)\n```\n\n# Add Jitpack repository\n\n```groovy\nrepositories {\n    maven { url \"https://jitpack.io\" }\n}\n```\n\n```groovy\nimplementation 'com.github.awxkee:avif-coder:1.8.0' // or any version above picker from release tags\n\n// Glide avif plugin if you need one\nimplementation 'com.github.awxkee:avif-coder-glide:1.8.0' // or any version above picker from release tags\n\n// Coil avif plugin if you need one\nimplementation 'com.github.awxkee:avif-coder-coil:1.8.0' // or any version above picker from release tags\n```\n\n# Also supports coil integration\n\nJust add to image loader heif decoder factory and use it as image loader in coil\n\n```kotlin\nval imageLoader = ImageLoader.Builder(context)\n    .components {\n        add(HeifDecoder.Factory(context))\n    }\n    .build()\n```\n\n# Self-build\n\n## Requirements\n\nlibdav1d:\n\n- ndk\n- meson\n- ninja\n- cmake\n- nasm\n\nlibyuv, de265, x265, aom, sharpyuv(webp):\n\n- ndk\n- ninja\n- cmake\n- nasm\n- yasm\n\nlibheif:\n- ndk\n- ninja\n- cmake\n- and all built libraries above\n\nIf you wish to build by yourself you may use ready `build_aom.sh`\nscript, `build_dav1d.sh`, `build_x265.sh`, `build_de265.sh`, `build_yuv.sh`, `build_heif.sh` or you\nmay use `build_all.sh`\n\n**All commands are require the NDK path set by NDK_PATH environment variable**\n\n* If you wish to build for **x86** you have to add a **$INCLUDE_X86** environment variable for\n  example:*\n\n```shell\nNDK_PATH=/path/to/ndk INCLUDE_X86=yes bash build_aom.sh\n```\n\n# Disclaimer\n\n## AVIF\n\nAVIF is the next step in image optimization based on the AV1 video codec. It is standardized by the\nAlliance for Open Media. AVIF offers more compression gains than other image formats such as JPEG\nand WebP. Our and other studies have shown that, depending on the content, encoding settings, and\nquality target, you can save up to 50% versus JPEG or 20% versus WebP images. The advanced image\nencoding feature of AVIF brings codec and container support for HDR and wide color gamut images,\nfilm grain synthesis, and progressive decoding. AVIF support has improved significantly since Chrome\nM85 implemented AVIF support last summer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawxkee%2Favif-coder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawxkee%2Favif-coder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawxkee%2Favif-coder/lists"}