{"id":30805395,"url":"https://github.com/simformsolutionspvtltd/fast_image_compress","last_synced_at":"2025-09-06T00:56:53.565Z","repository":{"id":268686308,"uuid":"902850035","full_name":"SimformSolutionsPvtLtd/fast_image_compress","owner":"SimformSolutionsPvtLtd","description":"Flutter plugin that allows fast compression of images easily and quickly. 👌🔝🎉","archived":false,"fork":false,"pushed_at":"2025-05-12T10:31:27.000Z","size":1326,"stargazers_count":29,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-28T01:47:29.622Z","etag":null,"topics":["android","compression","flutter","flutterpackage","flutterwidgets","image","image-processing","ios","parellel-processing"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/fast_image_compress","language":"Dart","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/SimformSolutionsPvtLtd.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,"zenodo":null}},"created_at":"2024-12-13T11:54:45.000Z","updated_at":"2025-08-26T05:03:26.000Z","dependencies_parsed_at":"2024-12-18T10:29:52.418Z","dependency_job_id":"8735f2cb-8282-4099-a56d-393a8c881008","html_url":"https://github.com/SimformSolutionsPvtLtd/fast_image_compress","commit_stats":null,"previous_names":["simformsolutionspvtltd/fast_image_compress"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/SimformSolutionsPvtLtd/fast_image_compress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimformSolutionsPvtLtd%2Ffast_image_compress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimformSolutionsPvtLtd%2Ffast_image_compress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimformSolutionsPvtLtd%2Ffast_image_compress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimformSolutionsPvtLtd%2Ffast_image_compress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SimformSolutionsPvtLtd","download_url":"https://codeload.github.com/SimformSolutionsPvtLtd/fast_image_compress/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimformSolutionsPvtLtd%2Ffast_image_compress/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273842836,"owners_count":25177921,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","compression","flutter","flutterpackage","flutterwidgets","image","image-processing","ios","parellel-processing"],"created_at":"2025-09-06T00:56:52.332Z","updated_at":"2025-09-06T00:56:53.555Z","avatar_url":"https://github.com/SimformSolutionsPvtLtd.png","language":"Dart","readme":"![Fast Image Compress - Simform LLC.](https://raw.githubusercontent.com/SimformSolutionsPvtLtd/fast_image_compress/master/preview/banner.png)\n\n\n# fast_image_compress\n\n[![pub package](https://img.shields.io/pub/v/fast_image_compress.svg)](https://pub.dartlang.org/packages/fast_image_compress)\n[![GitHub license](https://img.shields.io/github/license/SimformSolutionsPvtLtd/fast_image_compress?style=flat-square)](https://github.com/SimformSolutionsPvtLtd/fast_image_compress/blob/master/LICENSE)\n\nA Flutter plugin that allows you to compress images easily and quickly.\n\n## Features\n\nFast Image Compress can do much more (and we are just getting started)\n\n- 📱 **Supported platform**. iOS, Android\n- 🧪 **Batch processing**. Support batch processing using batchSize\n- 🖼️ **Supported image types** jpeg, png and heic\n- ⏱  **Parallelism**. Support parallel image compression \n  \n## Why fast_image_compress\n\nThe following bar graph demonstrates the efficiency of our plugin compared to two other existing packages. \nThe comparison was conducted by compressing one image at a time for various image sizes, measuring the time taken in milliseconds (Y-axis) against the image size in MB (X-axis).\n\nBelow are the comparison graphs:\n\nAndroid             |  iOS\n:-------------------------:|:-------------------------:\n\u003cimg src=\"https://raw.githubusercontent.com/SimformSolutionsPvtLtd/fast_image_compress/master/preview/android_comparison_graph.png\" width=\"500\"\u003e  |  \u003cimg src=\"https://raw.githubusercontent.com/SimformSolutionsPvtLtd/fast_image_compress/master/preview/iOS_comparison_graph.png\" width=\"500\"\u003e\n\nThis visual representation highlights the better performance of our plugin in terms of compression speed and efficiency across different image sizes.\n\n## Installing\n\n1.  Add dependency to `pubspec.yaml`\n\n```dart\ndependencies:\n    fast_image_compress: \u003clatest_version\u003e\n```\nor run this command:\n\n```bash\nflutter pub add fast_image_compress\n```\n\n2.  Import the package\n```dart\nimport 'package:fast_image_compress/fast_image_compress.dart';\n```\n\nUse as:\n\n[See full example](https://github.com/SimformSolutionsPvtLtd/fast_image_compress/blob/master/example/lib/main.dart)\n\nThere are several ways to use the library api.\n\n```dart\n\n// 1. Compress an image and get Uint8List\nFuture\u003cUint8List\u003e compressImage(Uint8List imageData) async {\n  final compressedImage = await fastImageCompress.compressImage(\n    imageData: imageData,\n    quality: 60,\n    targetWidth: 400,\n    imageQuality: ImageQuality.low,\n  );\n  return compressedImage;\n}\n\n// 2. Compress list of images and get a list of Uint8List\nFuture\u003cList\u003cUint8List\u003e\u003e compressMultipleImages(List\u003cUint8List\u003e imageList) async {\n  final result = await fastImageCompress.compressImageList(\n    images: imageList,\n    quality: 30,\n    targetWidth: 800,\n    batchSize: 3,\n    imageQuality: ImageQuality.low,\n  );\n  return result;\n}\n  \n// 3. Cancel the compression process\nFuture\u003cvoid\u003e _cancelCompression() async {\n  await fastImageCompress.cancelCompression();\n}\n\n```\n## Parameters of `compressImage` function:\n\n| Parameter Name | Data type    | Default Value       | Description                                         |\n|----------------|--------------|---------------------|-----------------------------------------------------|\n| imageData      | Uint8List    | -                   | The image to be compressed                          |\n| quality        | int          | 60                  | The compression quality percentage                  |\n| targetWidth    | int?         | null                | The desired width for the compressed image          |\n| imageQuality   | ImageQuality | ImageQuality.medium | The quality of the image to store after compression |\n\n## Parameters of `compressImage` function:\n\n| Parameter Name | Data type    | Default Value       | Description                                               |\n|----------------|--------------|---------------------|-----------------------------------------------------------|\n| imageData      | Uint8List    | -                   | The image to be compressed                                |\n| quality        | int          | 60                  | The compression quality percentage                        |\n| targetWidth    | int?         | null                | The desired width for the compressed image                |\n| imageQuality   | ImageQuality | ImageQuality.medium | The quality of the image to store after compression       |\n| batchSize      | int          | 3                   | The number of images to process simultaneously in a batch |\n\n## About params\n\n### targetWidth\n\nThe `targetWidth` parameter allows you to resize the images to a specific width.\n\nUse this parameter when you need all images to have a uniform width. It is particularly useful for optimizing image processing performance.\nRecommended to use this parameter when image size or image width is large.\n### batchSize\n\nThe `batchSize` parameter determines how many images are processed in a single batch.\n\n- If the image sizes are large (greater than 50 MB), set batchSize to a smaller value to avoid memory issues.\n- If the image sizes are small, you can set a higher value (e.g., 6) for better performance.\n\nTo dynamically adjust batchSize based on the number of CPU threads available on the device, you can use the following code:\n```dart\nfinal maxAvailableCPUThreads = Platform.numberOfProcessors;\nfinal batchSize = maxAvailableCPUThreads \u003e 0 ? maxAvailableCPUThreads ~/ 2 : 1;\n```\n### imageQuality\n\nThe `imageQuality` parameter controls the quality of the processed images. It has three predefined values:\n- low\n- medium (default)\n- high\n\n## Android\n\nYou may need to update Kotlin to version `1.5.20` or higher.\n\n## About EXIF information\n\nUsing this library, the image orientation is maintained.\n\n#### HEIF(Heic)\n\n##### Heif on iOS\n\nOnly support iOS 11+.\n\n##### Heif on Android\n\nOnly support API 28+.\n\nNote: Requires hardware encoder support, so availability is not guaranteed on all devices running API 28 or higher.\n## Main Contributors\n\n\u003ctable\u003e\n  \u003ctr\u003e\n     \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/rashi-shah\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/69202025?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr/\u003e\u003csub\u003e\u003cb\u003eRashi Shah\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2021 Simform Solutions\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimformsolutionspvtltd%2Ffast_image_compress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimformsolutionspvtltd%2Ffast_image_compress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimformsolutionspvtltd%2Ffast_image_compress/lists"}