{"id":13610860,"url":"https://github.com/mmobin789/pixel","last_synced_at":"2025-04-13T01:33:20.602Z","repository":{"id":38211723,"uuid":"249466100","full_name":"mmobin789/pixel","owner":"mmobin789","description":"A lightweight image loader for Android backed by Kotlin Coroutines.","archived":false,"fork":false,"pushed_at":"2023-02-28T00:59:04.000Z","size":464,"stargazers_count":77,"open_issues_count":12,"forks_count":12,"subscribers_count":6,"default_branch":"develop","last_synced_at":"2024-08-01T19:55:49.536Z","etag":null,"topics":["android","androidx","coroutines","image-loader","images","kotlin","okhttp","okio"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mmobin789.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-03-23T15:16:34.000Z","updated_at":"2023-07-06T16:18:49.000Z","dependencies_parsed_at":"2024-08-01T19:44:25.309Z","dependency_job_id":"105d7c5a-be61-4449-8fc5-22e4be9889e9","html_url":"https://github.com/mmobin789/pixel","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmobin789%2Fpixel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmobin789%2Fpixel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmobin789%2Fpixel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmobin789%2Fpixel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmobin789","download_url":"https://codeload.github.com/mmobin789/pixel/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223558371,"owners_count":17165118,"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":["android","androidx","coroutines","image-loader","images","kotlin","okhttp","okio"],"created_at":"2024-08-01T19:01:48.717Z","updated_at":"2024-11-07T17:30:45.089Z","avatar_url":"https://github.com/mmobin789.png","language":"Kotlin","readme":"# Pixel\n![pixel](https://miro.medium.com/max/875/0*iAMn0EvUMF__xp3F)\n\n[![Maven Central](https://img.shields.io/maven-central/v/io.github.mmobin789.pixel/pixel.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.github.mmobin789.pixel%22%20AND%20a:%22pixel%22)\n[![CircleCI](https://circleci.com/gh/mmobin789/pixel/tree/develop.svg?style=svg)](https://circleci.com/gh/mmobin789/pixel/tree/develop)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/99e37f923d05499e9554019ebb4ac291)](https://www.codacy.com/gh/mmobin789/pixel/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=mmobin789/pixel\u0026amp;utm_campaign=Badge_Grade)\n\n[![Kotlin Version](https://img.shields.io/badge/kotlin-1.4.31-orange.svg)](http://kotlinlang.org/)\n\nA lightweight image loading library for Android backed by Kotlin Coroutines.\n\n**Optimal**: Pixel performs optimizations with memory \u0026 disk caching, downsampling the image in memory by image view size (pixel by pixel), re-using Bitmaps, automatically pause/cancel requests (Signature requests), and more.\n\n**Light**: Pixel adds less than ~100 methods for now to your APK, which is considerably less than Glide,Fresco,Picasso and Coil.\n\n**Easy to use**: Pixel's API uses Kotlin's language features and classic design for simplicity and minimal boilerplate.\n\n**Modern**: Pixel is Kotlin-first and interoperable with Java.\n\n## Features\n - Signature Loads\n - Image Loading (For now image loading from network is supported only)\n - Modern (Kotlin Co-routines for structured concurrency and low latency)\n - Reliable (No 3rd party library used)\n - Supports JAVA\n \n \n ## Why to use ?\n   \n   - It only downloads the image per width and height of image view per **pixel** hence the name and pauses all loads when UI is not          available.\n   - Signature Download (Same image download with same requested width and height will cancel previous such download in progress)\n   - Synchronous load cancellation.\n   - UI Responsive.\n  \n \n \n ## Download\n \n **Gradle**\n ```\n implementation 'io.github.mmobin789.pixel:pixel:1.0.0-alpha'\n ```\n \n  **Gradle Kotlin DSL**\n ```\nimplementation(\"io.github.mmobin789.pixel:pixel:1.0.0-alpha\")\n ```\n \n **Maven**\n  \n```\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.github.mmobin789.pixel\u003c/groupId\u003e\n  \u003cartifactId\u003epixel\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.0-alpha\u003c/version\u003e\n  \u003ctype\u003eaar\u003c/type\u003e\n\u003c/dependency\u003e\n```\n \n\n## Documentation\n \nFor complete usage in Kotlin and Java clone the project in Android Studio and run the sample app included.\n\n \n **Load an Image**\n \n ```\n Pixel.load(\"https://images.unsplash.com/photo-1492684223066-81342ee5ff30?ixlib=rb-1.2.1\u0026auto=format\u0026fit=crop\u0026w=1000\u0026q=80\", iv)\n ```\n **Load an Image with options**\n \n ```\n  //Loads an image with a placeholder resource.\n Pixel.load(\"image path\", iv3, PixelOptions.Builder().setPlaceholderResource(R.drawable.ic_loading_android).build())\n \n /**Loads an image of 30x30 pixels with a placeholder resource.\n For best result, know the size of image from source and don't provide size less than size of image view\n **/\n Pixel.load(\"image path\", holder.iv, PixelOptions.Builder().setPlaceholderResource(R.drawable.ic_loading_android)\n .setImageSize(30, 30).build())\n\n ```\n \n **Configure memory and disk cache**\n \n ```\n // Set image memory cache to 48MBS\n  PixelConfiguration.setImageMemoryCacheSize(48)\n  \n // Set Disk cache to 512MBS\n  PixelConfiguration.setDiskCacheSize(512)\n  \n // Clear image cache\n  PixelConfiguration.clearImageCache()\n  \n   \n   ```\n   \n **Logging**\n \n   ```\n // Enable logging behavior\n   PixelConfiguration.setLoggingEnabled(true)\n   \n // Disable logging behavior (Default)\n   PixelConfiguration.setLoggingEnabled(false)\n   ```\n   ## Requirements\n   - Min SDK 23\n   - Compile SDK 30+\n   \n   ## R8 / Proguard\n   Pixel is completely compatible with R8 and doesn't require adding any extra rules.\n\n   If you use Proguard, you may need to add rules for [Coroutines](https://github.com/Kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-core/jvm/resources/META-INF/proguard/coroutines.pro)\n   \n   ## Details\n   \n   Read more on [medium](https://medium.com/better-programming/introducing-pixel-a-new-kotlin-image-loading-library-for-android-a37a7a192f73).\n   \n   ## Releases\n   See release notes [here](https://github.com/mmobin789/pixel/releases).\n \n ### In-Development\n This library is maintained and under development as new features are periodically added.\n\n\n## Known Issues\nIssues can be reported [here](https://github.com/mmobin789/pixel/issues).\n\nCurrently, This library isn't fully prepared to handle images in listing containers like recycler view or list view hence causes the images to load at random positions,duplications or not load an entire collection of images fully as well we are trying to find solution to create a proper bitmap memory pool which is a hard task and ofcourse any help is welcome in the matter.\n\n## Inspiration\nThe idea of employing Kotlin Coroutines that drive the working of this library partly came from [Coil](https://github.com/coil-kt).\n\n## Co-Creator\n  [Malik Dawar](https://github.com/malikdawar)\n\n## License\nCopyright 2020 Pixel Contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","funding_links":[],"categories":["Kotlin"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmobin789%2Fpixel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmobin789%2Fpixel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmobin789%2Fpixel/lists"}