{"id":15651706,"url":"https://github.com/cssxsh/mirai-skia-plugin","last_synced_at":"2025-04-30T17:30:11.508Z","repository":{"id":43186289,"uuid":"460321061","full_name":"cssxsh/mirai-skia-plugin","owner":"cssxsh","description":"Mirai Console Skiko/Skia 图像库前置插件","archived":false,"fork":false,"pushed_at":"2024-04-17T13:30:00.000Z","size":18995,"stargazers_count":37,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T07:47:15.854Z","etag":null,"topics":["mirai","mirai-console","skia","skiko"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cssxsh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-02-17T07:09:31.000Z","updated_at":"2025-03-25T17:44:07.000Z","dependencies_parsed_at":"2024-01-14T05:43:20.645Z","dependency_job_id":"7de8c359-1725-41de-b6ce-e797f4a8f1bc","html_url":"https://github.com/cssxsh/mirai-skia-plugin","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fmirai-skia-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fmirai-skia-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fmirai-skia-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssxsh%2Fmirai-skia-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cssxsh","download_url":"https://codeload.github.com/cssxsh/mirai-skia-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251751008,"owners_count":21637837,"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":["mirai","mirai-console","skia","skiko"],"created_at":"2024-10-03T12:39:50.140Z","updated_at":"2025-04-30T17:30:11.378Z","avatar_url":"https://github.com/cssxsh.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Mirai Skia Plugin](https://github.com/cssxsh/mirai-skia-plugin)\n\n\u003e Mirai Skia 前置插件\n\n[![maven-central](https://img.shields.io/maven-central/v/xyz.cssxsh.mirai/mirai-skia-plugin)](https://search.maven.org/artifact/xyz.cssxsh.mirai/mirai-skia-plugin)\n[![test](https://github.com/cssxsh/mirai-skia-plugin/actions/workflows/test.yml/badge.svg)](https://github.com/cssxsh/mirai-skia-plugin/actions/workflows/test.yml)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ad7fe0e93f794914894fe5e6d3f23b2c)](https://www.codacy.com/gh/cssxsh/mirai-skia-plugin/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=cssxsh/mirai-skia-plugin\u0026amp;utm_campaign=Badge_Grade)\n\nBe based on \u003chttps://github.com/JetBrains/skiko\u003e\n\n## SkiaToMirai\n\n[SkiaToMirai](src/main/kotlin/xyz/cssxsh/mirai/skia/SkiaToMirai.kt)  \n[SkiaExternalResource](src/main/kotlin/xyz/cssxsh/mirai/skia/SkiaExternalResource.kt)  \n\n## Example\n\n[Example](src/main/kotlin/xyz/cssxsh/skia/Example.kt)\n\n## Dependency\n\n作为 Mirai Console 前置插件： \n配置文件 `build.gradle.kts`\n```kotlin\nrepositories {\n    mavenCentral()\n    // skiko 还未发布正式版到 Central，需要加入下面的 repo\n    maven(url = \"https://maven.pkg.jetbrains.space/public/p/compose/dev\")\n}\n\ndependencies {\n    compileOnly(\"xyz.cssxsh.mirai:mirai-skia-plugin:${version}\")\n}\n\nmirai {\n    jvmTarget = JavaVersion.VERSION_11\n}\n```\n定义 `dependsOn`\n```kotlin\nobject MemeHelperPlugin : KotlinPlugin(\n    JvmPluginDescription(\n        id = \"xyz.cssxsh.mirai.plugin.meme-helper\",\n        name = \"meme-helper\",\n        version = \"1.0.2\",\n    ) {\n        author(\"cssxsh\")\n        dependsOn(\"xyz.cssxsh.mirai.plugin.mirai-skia-plugin\", \"\u003e= 1.1.0\", false)\n    }\n)\n```\n\n作为 Mirai Core Jvm 引用:  \n配置文件 `build.gradle.kts`\n```kotlin\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    implementation(\"xyz.cssxsh.mirai:mirai-skia-plugin:${version}\")\n}\n```\n手动调用库加载函数\n```kotlin\nimport xyz.cssxsh.mirai.skia.*\n\ncheckPlatform()\nloadJNILibrary()\n```\n\n## GIF\n\n由于 Skiko 没有携带 GIF 编码器，\n这里提供两个实现\n*   [kotlin](src/main/kotlin/xyz/cssxsh/skia/gif) - [petpet](src/main/kotlin/xyz/cssxsh/skia/Example.kt)\n*   [rust](src/main/kotlin/xyz/cssxsh/gif) (Base on [JNI](https://github.com/cssxsh/gif-jni)) - [dear](src/main/kotlin/xyz/cssxsh/skia/Example.kt)\n\n## 安装\n\n### MCL 指令安装\n\n**请确认 mcl.jar 的版本是 2.1.0+**  \n`./mcl --update-package xyz.cssxsh.mirai:mirai-skia-plugin --channel maven-stable --type plugins`\n\n### 手动安装\n\n1.  从 [Releases](https://github.com/cssxsh/mirai-skia-plugin/releases) 或者 [Maven](https://repo1.maven.org/maven2/xyz/cssxsh/mirai/mirai-skia-plugin/) 下载 `mirai2.jar`\n2.  将其放入 `plugins` 文件夹中\n\n### 缺少库\n\n如果启动后出现 `XXX: cannot open shared object file: No such file or directory` 或者 `XXX: 无法打开共享对象文件: 没有那个文件或目录`  \n说明你的 `Linux` 系统缺少了某些前置库文件 `XXX`, 你需要自行补充安装, 可以通过 \u003chttps://pkgs.org/search\u003e 检索相关信息  \n\n例如，出现 `libGL.so.1: cannot open shared object file: No such file or directory`  \n参阅 \u003chttps://pkgs.org/search/?q=libGL.so.1\u003e, 找到对应的系统及版本然后，进入相关库介绍页面，下拉找到安装指令  \n\n## 兼容性\n\n|        OS/Arch         | Plugin | Skiko  |  Gif  |\n|:----------------------:|:------:|:------:|:-----:|\n|     Windows-10-X64     | 1.3.2  | 0.7.58 | 2.0.8 |\n|     GNU/Linux-X64      | 1.3.2  | 0.7.58 | 2.0.8 |\n|    GNU/Linux-ARM64     | 1.3.2  | 0.7.58 | 2.0.8 |\n|       MacOS-X64        | 1.3.2  | 0.7.58 | 2.0.8 |\n|      MacOS-ARM64       | 1.3.2  | 0.7.58 | 2.0.8 |\n| Termux (Android-ARM64) | 1.3.2  | 0.7.54 | 2.0.8 |\n\n暂时不支持 `Alpine Linux` 等 `MUSL/linux` 系统, 你可以关注 [![issue-11](https://shields.io/github/issues/detail/state/cssxsh/mirai-skia-plugin/11)](https://github.com/cssxsh/mirai-skia-plugin/issues/11)\n\n## [爱发电](https://afdian.net/@cssxsh)\n\n![afdian](.github/afdian.jpg)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssxsh%2Fmirai-skia-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcssxsh%2Fmirai-skia-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssxsh%2Fmirai-skia-plugin/lists"}