diff --git a/README.md b/README.md index d5f4cef..3daba1d 100644 --- a/README.md +++ b/README.md @@ -1,102 +1,287 @@ -## Description - -Remige is a forked version of libSquoosh, integrating Squoosh's image codecs directly into your JavaScript applications. This fork ensures continued support and enhancements, compatible with the latest Node.js versions for optimal performance in modern development environments. - -### Compatibility - -Remige supports the latest Node.js versions, ensuring compatibility and optimal performance in modern development environments. - -### Why Forked? - -With ongoing updates and improvements, Remige serves developers seeking robust image compression solutions within their JavaScript projects. It maintains functionality and reliability for current development practices. - -## Installation - -Install Remige in your local project with: - -```bash -$ npm install remige -``` - -To use Remige, import `ImagePool` and set up your image processing pipeline: - -```javascript -import { ImagePool } from "remige"; -import { cpus } from "os"; - -const imagePool = new ImagePool(cpus().length); -``` - -Ensure to only create one `ImagePool` instance to avoid memory issues during parallel image processing. - -## Ingesting Images - -Ingest images using `imagePool.ingestImage()`, accepting `ArrayBuffer` from `fs.readFile()` or `fetch()`. - -```javascript -import fs from "fs/promises"; - -const file = await fs.readFile("./path/to/image.png"); -const image = imagePool.ingestImage(file); -``` - -## Preprocessing and Encoding Images - -Preprocess and encode images to various formats: - -```javascript -const preprocessOptions = { - resize: { - width: 100, - height: 50, - }, -}; - -await image.preprocess(preprocessOptions); - -const encodeOptions = { - mozjpeg: {}, // default settings - jxl: { - quality: 90, - }, -}; - -const result = await image.encode(encodeOptions); -``` - -## Closing ImagePool - -Close the `ImagePool` pipeline to prevent ingesting and encoding new images: - -```javascript -await imagePool.close(); -``` - -## Writing Encoded Images to File System - -Write encoded images to the file system: - -```javascript -const rawEncodedImage = image.encodedWith.mozjpeg.binary; - -await fs.writeFile("/path/to/new/image.jpg", rawEncodedImage); -``` - -## Extracting Image Information - -Extract decoded and encoded image information: - -```javascript -console.log(await image.decoded); -console.log(image.encodedWith.jxl); -``` - -## Auto Optimizer - -Remige includes an experimental auto optimizer: - -```javascript -const encodeOptions = { - mozjpeg: "auto", -}; -``` +
+ +# [Title] - [short desc] + +

[This is a placeholder paragraph. Here some introductory text or describe the content that will eventually go in this section. This text is meant to give a sense of how the final content will look in the design.] +

+ +### Supported Platforms + +[![Android](https://img.shields.io/badge/Android-3DDC84?style=for-the-badge&logo=android&logoColor=white)]() +[![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)]() +[![Windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white)]() +[![Node JS](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)]() +[![Python](https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white)]() +[![Java](https://img.shields.io/badge/Java-ED8B00?style=for-the-badge&logo=openjdk&logoColor=white)]() + +--- + +[uname-holder/reponame-holder] [npm-name-holder] [wf-holder] - for test&build + +

+ + + + GitHub last commit + + + + + + GitHub commit activity + + + +

+ +

+ + + + GitHub Actions Build Status + + + + + + GitHub Actions Test Status + + + +

+ +--- + +

+ + + + GitHub License + + + + + + GitHub Release + + + +

+ +

+ + + + CodeFactor Grade + + + +

+ +--- + +

+ + + + NPM Downloads + + + + + + GitHub Repo stars + + + +

+ +--- + +

+ + + + GitHub Sponsors + + + +

+ +--- + +
+ +## Table of Contents 📝 + +- [Features and Benefits](#features-and-benefits-) +- [Use Cases](#use-cases-) +- [Friendly request to users](#-friendly-request-to-users) + +- [Installation - Step-by-Step Guide](#installation---step-by-step-guide-) +- [Usage](#usage) +- [In-Action](#in-action-) + +- [License](#license-%EF%B8%8F) +- [Contributing to Our Project](#contributing-to-our-project-) +- [Website](#website-) + +- [Contact Information](#contact-information) +- [Credits](#credits-) + +## Features and Benefits ✨ + +- [f1] +- [f2] +- [fn] + +## Use Cases ✅ + +- [usecase 1] +- [use case 2] + +--- + +### 🙏🏻 Friendly Request to Users + +Every star on this repository is a sign of encouragement, a vote of confidence, and a reminder that our work is making a difference. If this project has brought value to you, even in the smallest way, **please consider showing your support by giving it a star.** ⭐ + +_"Star" button located at the top-right of the page, near the repository name._ + +Your star isn’t just a digital icon—it’s a beacon that tells us we're on the right path, that our efforts are appreciated, and that this work matters. It fuels our passion and drives us to keep improving, building, and sharing. + +If you believe in what we’re doing, **please share this project with others who might find it helpful.** Together, we can create something truly meaningful. + +Thank you for being part of this journey. Your support means the world to us. 🌍💖 + +--- + +## Installation - Step-by-Step Guide 🪜 + +[Installation instructions here] + +- **Step 1:** +- **Step 2:** +- **Step 3:** +- **Step 4:** +- **Step 5:** + +## Usage + +- [purpose heading] + [Demonstration here] + +```bash +demo +``` + +## In-Action 🤺 + +[video] or [gif] or [image] + +## License ©️ + +This project is licensed under the [Apache License 2.0 or GNU General Public License v3.0 or MIT](LICENSE). + +## Contributing to Our Project 🤝 + +We’re always open to contributions and fixing issues—your help makes this project better for everyone. + +If you encounter any errors or issues, please don’t hesitate to [raise an issue](../../issues/new). This ensures we can address problems quickly and improve the project. + +For those who want to contribute, we kindly ask you to review our [Contribution Guidelines](CONTRIBUTING) before getting started. This helps ensure that all contributions align with the project's direction and comply with our existing [license](LICENSE). + +We deeply appreciate everyone who contributes or raises issues—your efforts are crucial to building a stronger community. Together, we can create something truly impactful. + +Thank you for being part of this journey! + +## Website 🌐 + +[https://darsan.in] + +## Contact Information + +For any questions, please reach out via hello@darsan.in or [LinkedIn](https://www.linkedin.com/in/darsan-in/). + +## Credits 🙏🏻 + +[credits to lib maintainers/creators] + +--- + +

+ + +Darsan at Linkedin + + + + place holder image + + + +Darsan at Youtube + + + + place holder image + + + +Darsan at Facebook + + + + place holder image + + + +Darsan at NPM + + + + place holder image + + + +Darsan at Github + + + + place holder image + + + +Darsan at Huggingface + + + + place holder image + + + +Darsan at Reddit + + + + place holder image + + + +Darsan Website + + +

+ +--- + +#### Topics + +