{"id":27933098,"url":"https://github.com/ustc-zzzz/avif-imageio-native-reader","last_synced_at":"2025-05-07T04:27:24.482Z","repository":{"id":291448307,"uuid":"977628055","full_name":"ustc-zzzz/avif-imageio-native-reader","owner":"ustc-zzzz","description":"A native JNI binding for avif image format, which supports Java imageio service","archived":false,"fork":false,"pushed_at":"2025-05-04T17:57:40.000Z","size":47,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-04T18:28:41.064Z","etag":null,"topics":["avif","avif-animated","avif-decoder","heif","imageio","java"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ustc-zzzz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2025-05-04T16:28:22.000Z","updated_at":"2025-05-04T18:09:03.000Z","dependencies_parsed_at":"2025-05-04T18:42:08.031Z","dependency_job_id":null,"html_url":"https://github.com/ustc-zzzz/avif-imageio-native-reader","commit_stats":null,"previous_names":["ustc-zzzz/avif-imageio-native-reader"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ustc-zzzz%2Favif-imageio-native-reader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ustc-zzzz%2Favif-imageio-native-reader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ustc-zzzz%2Favif-imageio-native-reader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ustc-zzzz%2Favif-imageio-native-reader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ustc-zzzz","download_url":"https://codeload.github.com/ustc-zzzz/avif-imageio-native-reader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252812565,"owners_count":21808164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["avif","avif-animated","avif-decoder","heif","imageio","java"],"created_at":"2025-05-07T04:27:24.013Z","updated_at":"2025-05-07T04:27:24.474Z","avatar_url":"https://github.com/ustc-zzzz.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AVIF ImageIO Native Reader\n\n[![](https://jitpack.io/v/ustc-zzzz/avif-imageio-native-reader.svg)](https://jitpack.io/#ustc-zzzz/avif-imageio-native-reader)\n\nA native JNI binding for avif image format, which supports Java imageio service.\n\nThis library requires Java 17 or above.\n\n## Include Dependency\n\n```groovy\n// Add it in your root build.gradle at the end of repositories\nallprojects {\n    repositories {\n        maven { url 'https://jitpack.io' }\n    }\n}\n// Add the dependency\ndependencies {\n    implementation 'com.github.ustc-zzzz:avif-imageio-native-reader:master-SNAPSHOT'\n}\n```\n\n## Usage\n\n```\n$ jshell --class-path avif-imageio-native-reader.jar\n|  Welcome to JShell -- Version 17.0.15\n|  For an introduction type: /help intro\n\njshell\u003e import javax.imageio.*\n\njshell\u003e ImageIO.read(new File(\"paris_icc_exif_xmp.avif\")) // still image\n$2 ==\u003e BufferedImage@6aceb1a5: type = 5 ColorModel: #pixelBits = 24 numComponents = 3 color space = java.awt.color.ICC_ColorSpace@2d6d8735 transparency = 1 has alpha = false isAlphaPre = false ByteInterleavedRaster: width = 403 height = 302 #numDataElements 3 dataOff[0] = 2\n\njshell\u003e \"%dx%d\".formatted($2.getWidth(), $2.getHeight())\n$3 ==\u003e \"403x302\"\n\njshell\u003e ImageIO.getImageReadersBySuffix(\"avif\").next()\n$4 ==\u003e com.github.ustc_zzzz.imageio.avif.AVIFImageReader@7bb11784\n\njshell\u003e ImageIO.createImageInputStream(new File(\"horse_in_motion_yuv420_8bpc.avif\")) // animated image\n$5 ==\u003e javax.imageio.stream.FileImageInputStream@34033bd0\n\njshell\u003e $4.setInput($5)\n\njshell\u003e $4.getNumImages(true) // image count\n$7 ==\u003e 11\n\njshell\u003e $4.read(0) // first image\n$8 ==\u003e BufferedImage@17d99928: type = 5 ColorModel: #pixelBits = 24 numComponents = 3 color space = java.awt.color.ICC_ColorSpace@2d6d8735 transparency = 1 has alpha = false isAlphaPre = false ByteInterleavedRaster: width = 1370 height = 885 #numDataElements 3 dataOff[0] = 2\n\njshell\u003e $4.read(10) // last image\n$9 ==\u003e BufferedImage@1ae369b7: type = 5 ColorModel: #pixelBits = 24 numComponents = 3 color space = java.awt.color.ICC_ColorSpace@2d6d8735 transparency = 1 has alpha = false isAlphaPre = false ByteInterleavedRaster: width = 1370 height = 885 #numDataElements 3 dataOff[0] = 2\n\njshell\u003e $4.getImageMetadata(0) // metadata for current frame\n$10 ==\u003e com.github.ustc_zzzz.imageio.avif.AVIFImageMetadata@2b80d80f\n\njshell\u003e (javax.imageio.metadata.IIOMetadataNode) $10.getAsTree(\"ustc_zzzz_imageio_avif_image_1.0\") // metadata tree\n$11 ==\u003e javax.imageio.metadata.IIOMetadataNode@28864e92\n\njshell\u003e (javax.imageio.metadata.IIOMetadataNode) $11.getElementsByTagName(\"Depth\").item(0) // depth node\n$12 ==\u003e javax.imageio.metadata.IIOMetadataNode@6833ce2c\n\njshell\u003e $12.getUserObject() // 8-bit depth image\n$13 ==\u003e 8\n\njshell\u003e (javax.imageio.metadata.IIOMetadataNode) $11.getElementsByTagName(\"PTSInTimescales\").item(0) // pts in timescales node\n$14 ==\u003e javax.imageio.metadata.IIOMetadataNode@6e3c1e69\n\njshell\u003e $14.getUserObject() // this image to be shown at tick 0\n$15 ==\u003e 0\n\njshell\u003e (javax.imageio.metadata.IIOMetadataNode) $11.getElementsByTagName(\"DurationInTimescales\").item(0) // duration in timescales node\n$16 ==\u003e javax.imageio.metadata.IIOMetadataNode@649d209a\n\njshell\u003e $16.getUserObject() // this image to be shown for 1 tick\n$17 ==\u003e 1\n\njshell\u003e $4.getStreamMetadata() // metadata for the whole avif image\n$18 ==\u003e com.github.ustc_zzzz.imageio.avif.AVIFStreamMetadata@256216b3\n\njshell\u003e (javax.imageio.metadata.IIOMetadataNode) $18.getAsTree(\"ustc_zzzz_imageio_avif_stream_1.0\") // metadata tree\n$19 ==\u003e javax.imageio.metadata.IIOMetadataNode@d7b1517\n\njshell\u003e (javax.imageio.metadata.IIOMetadataNode) $19.getElementsByTagName(\"TimeScale\").item(0) // time scale node\n$20 ==\u003e javax.imageio.metadata.IIOMetadataNode@23223dd8\n\njshell\u003e $20.getUserObject() // the time scale is 15Hz (one tick for 1/15 second)\n$21 ==\u003e 15\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fustc-zzzz%2Favif-imageio-native-reader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fustc-zzzz%2Favif-imageio-native-reader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fustc-zzzz%2Favif-imageio-native-reader/lists"}