{"id":13659556,"url":"https://github.com/alexzhirkevich/qrose","last_synced_at":"2026-01-25T15:01:08.978Z","repository":{"id":200144228,"uuid":"704899229","full_name":"alexzhirkevich/qrose","owner":"alexzhirkevich","description":"Styled QR \u0026 Barcode generation library for Compose Multiplatform and Jetpack Compose","archived":false,"fork":false,"pushed_at":"2026-01-25T13:29:43.000Z","size":455,"stargazers_count":466,"open_issues_count":3,"forks_count":19,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-25T13:31:31.123Z","etag":null,"topics":["compose","compose-multiplatform","jetpack-compose","kotlin","kotlin-multiplatform","multiplatform","qr","qr-code","qr-code-generator","qr-generator","qrcode"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/alexzhirkevich.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}},"created_at":"2023-10-14T12:50:56.000Z","updated_at":"2026-01-25T13:29:47.000Z","dependencies_parsed_at":"2024-06-12T23:57:48.441Z","dependency_job_id":null,"html_url":"https://github.com/alexzhirkevich/qrose","commit_stats":null,"previous_names":["alexzhirkevich/qrose"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/alexzhirkevich/qrose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexzhirkevich%2Fqrose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexzhirkevich%2Fqrose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexzhirkevich%2Fqrose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexzhirkevich%2Fqrose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexzhirkevich","download_url":"https://codeload.github.com/alexzhirkevich/qrose/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexzhirkevich%2Fqrose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28754807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T13:59:49.818Z","status":"ssl_error","status_checked_at":"2026-01-25T13:59:33.728Z","response_time":113,"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":["compose","compose-multiplatform","jetpack-compose","kotlin","kotlin-multiplatform","multiplatform","qr","qr-code","qr-code-generator","qr-generator","qrcode"],"created_at":"2024-08-02T05:01:10.032Z","updated_at":"2026-01-25T15:01:08.971Z","avatar_url":"https://github.com/alexzhirkevich.png","language":"Kotlin","funding_links":[],"categories":["Libraries","Uncategorized","图像处理"],"sub_categories":["🍎 Compose UI","Uncategorized","语音合成"],"readme":"# QRose\n\n![badge-Android](https://img.shields.io/badge/Platform-Android-brightgreen)\n![badge-iOS](https://img.shields.io/badge/Platform-iOS-lightgray)\n![badge-JVM](https://img.shields.io/badge/Platform-JVM-orange)\n![badge-macOS](https://img.shields.io/badge/Platform-macOS-purple)\n![badge-web](https://img.shields.io/badge/Platform-Web-blue)\n\nBarcode generation library for Compose Multiplatform\n\n\u003cimg width=\"465\" alt=\"Screenshot 2023-10-10 at 10 34 05\" src=\"https://github.com/alexzhirkevich/qrose/assets/63979218/7469cc1c-d6fd-4dab-997d-f2604dfa49de\"\u003e\n\nWhy QRose?\n- **Lightweight** - doesn't contain any dependencies except of `compose.ui`;\n- **Flexible** - high customization ability that is open for extension;\n- **Efficient** - declare and render codes synchronously right from the composition in 60+ fps;\n- **Scalable** - no raster bitmaps, only scalable vector graphics;\n- **Multiplatform** - supports all the targets supported by Compose Multiplatform.\n- **Multiformat** - multiple formats supported: `QR`, `UPC`, `EAN`, `Code 128/93/39`, `Codabar`, `ITF`.\n\n# Installation\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.alexzhirkevich/qrose/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.alexzhirkevich/qrose)\n\n```gradle\ndependencies {\n\n    // For QR codes\n    implementation(\"io.github.alexzhirkevich:qrose:\u003clatest_version\u003e\")\n    \n    // For single-dimension barcodes (UPC,EAN, Code128, ...)\n    implementation(\"io.github.alexzhirkevich:qrose-oned:\u003clatest_version\u003e\")\n}\n```\n\n# Usage\n\n## Basic\n\nYou can create code right in composition using `rememberQrCodePainter`, `rememberBarcodePainter`.\nOr use `QrCodePainter`, `BarcodePainter` to create it outside of Compose. \n\n```kotlin\nImage(\n    painter = rememberQrCodePainter(\"https://example.com\"),\n    contentDescription = \"QR code referring to the example.com website\"\n)\n\nImage(\n    painter = rememberBarcodePainter(\"9780201379624\", BarcodeType.EAN13),\n    contentDescription = \"EAN barcode for some product\"\n)\n```\n\n## Design\n\nQR codes have flexible styling options, for example:\n\n```kotlin\nval qrcodePainter = rememberQrCodePainter(\n    data = \"https://example.com\",\n    ballShape = QrBallShape.circle(),\n    darkPixelShape = QrPixelShape.roundCorners(),\n    frameShape = QrFrameShape.roundCorners(.25f),\n    darkBrush = QrBrush.brush {\n        Brush.linearGradient(\n            0f to Color.Red,\n            1f to Color.Blue,\n            end = Offset(it, it)\n        )\n    },\n    frameBrush = QrBrush.solid(Color.Black),\n    logoPainter = rememberQrCodePainter(\"123\"),\n    logoPadding = QrLogoPadding.Natural(.1f),\n    logoShape = QrLogoShape.circle(),\n    logoSize = 0.2f,\n)\n```\n\nOr with DSL constructor:\n\n\n```kotlin\nval logoPainter : Painter = painterResource(\"logo.png\")\n\nval qrcodePainter : Painter = rememberQrCodePainter(\"https://example.com\") {\n    logo {\n        painter = logoPainter\n        padding = QrLogoPadding.Natural(.1f)\n        shape = QrLogoShape.circle()\n        size = 0.2f\n    }\n\n    shapes {\n        ball = QrBallShape.circle()\n        darkPixel = QrPixelShape.roundCorners()\n        frame = QrFrameShape.roundCorners(.25f)\n    }\n    colors {\n        dark = QrBrush.brush {\n            Brush.linearGradient(\n                0f to Color.Red,\n                1f to Color.Blue,\n                end = Offset(it, it)\n            )\n        }\n        frame = QrBrush.solid(Color.Black)\n    }\n}\n```\n\n\n## Customize\n\nYou can create your own shapes for each QR code part, for example:\n\n```kotlin\nclass MyCircleBallShape : QrBallShape {\n    \n    override fun Path.path(size: Float, neighbors: Neighbors): Path = apply {\n        addOval(Rect(0f,0f, size, size))\n    }\n}\n```\n\n\u003e **Note**\n\u003eA path here uses [`PathFillType.EvenOdd`](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathFillType#EvenOdd()) that cannot be changed.\n\n## Data types\n\nQR codes can hold various payload types: Text, Wi-Fi, E-mail, vCard, etc.\n\n`QrData` object can be used to perform such encodings, for example:\n\n```kotlin\nval wifiData : String = QrData.wifi(ssid = \"My Network\", psk = \"12345678\")\n\nval wifiCode = rememberQrCodePainter(wifiData)\n```\n\n## Export\n\nQR codes can be exported to `PNG`, `JPEG` and `WEBP` formats using `toByteArray` function:\n\n```kotlin\n\nval painter : Painter = QrCodePainter(\n    data = \"https://example.com\",\n    options =  QrOptions { \n        colors {\n            //...\n        }\n    }\n)\n\nval bytes : ByteArray = painter.toByteArray(1024, 1024, ImageFormat.PNG)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexzhirkevich%2Fqrose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexzhirkevich%2Fqrose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexzhirkevich%2Fqrose/lists"}