|
| 1 | +<br/> |
| 2 | +<div align="center"> |
| 3 | + <a href="https://github.com/fnands/mimage"> |
| 4 | + <img src="image.jpeg" alt="Logo" width="200" height="200"> |
| 5 | + </a> |
| 6 | + |
| 7 | + <h1 align="center">Mimage</h1> |
| 8 | + |
| 9 | + <p align="center"> |
| 10 | + A library for reading images in pure* Mojo 🔥 |
| 11 | + |
| 12 | +  |
| 13 | +  |
| 14 | + </p> |
| 15 | +</div> |
| 16 | + |
| 17 | +*Not pure Mojo yet, but hopefully soon. |
| 18 | +## About The Project |
| 19 | + |
| 20 | +Mimage is a image manipulation library loosely based on Python's [Pillow](https://github.com/python-pillow/Pillow). The goal is to be able to read and write the most popular image formats directly from Mojo. |
| 21 | + |
| 22 | +## Quick Start |
| 23 | + |
| 24 | +Basic usage: |
| 25 | + |
| 26 | +```mojo |
| 27 | +import mimage as mi |
| 28 | +
|
| 29 | +def main(): |
| 30 | +
|
| 31 | + tensor = mi.imread("my/png/image.png") |
| 32 | +
|
| 33 | +``` |
| 34 | + |
| 35 | +Try out the tests yourself: |
| 36 | + |
| 37 | +```sh |
| 38 | +mojo -I . tests/test_open_png.mojo |
| 39 | +``` |
| 40 | + |
| 41 | +## Roadmap |
| 42 | + |
| 43 | +### v0.1.0 ✅ |
| 44 | +- [x] Read simple 8-bit PNGs |
| 45 | + |
| 46 | +### Near term |
| 47 | +- [ ] Read jpegs |
| 48 | + |
| 49 | +### Medium term |
| 50 | +- [ ] Read more complex PNGs |
| 51 | +- [ ] Write PNGs |
| 52 | +- [ ] Write jpegs |
| 53 | + |
| 54 | +### Long term |
| 55 | +- [ ] v1.0.0 will be achieved when Mimage can open all the same images as Pillow. |
| 56 | + |
| 57 | + |
| 58 | +## Contributing |
| 59 | + |
| 60 | +Before creating a new issue, please: |
| 61 | +* Check if the issue already exists. If an issue is already reported, you can contribute by commenting on the existing issue. |
| 62 | +* If not, create a new issue and include all the necessary details to understand/recreate the problem or feature request. |
| 63 | + |
| 64 | +### Creating A Pull Request |
| 65 | + |
| 66 | +1. Fork the Project |
| 67 | +2. Create your Feature Branch |
| 68 | +3. Commit your Changes |
| 69 | +4. Push to the Branch |
| 70 | +5. Open a Pull Request |
| 71 | +> Once your changes are pushed, navigate to your fork on GitHub. And create a pull request against the original fnands/mimage repository. |
| 72 | +> - Before creating a PR make sure it doesn't break any of the unit-tests. (e.g. `mojo -I . tests/test_open_png.mojo`) |
| 73 | +> - Introducing new big features requires a new test! |
| 74 | +> - In the pull request, provide a detailed description of the changes and why they're needed. Link any relevant issues. |
| 75 | +> - If there are any specific instructions for testing or validating your changes, include those as well. |
| 76 | +
|
| 77 | +## License |
| 78 | + |
| 79 | +Distributed under the Apache 2.0 License with LLVM Exceptions. See [LICENSE](https://github.com/fnands/mimage/blob/main/LICENSE) and the LLVM [License](https://llvm.org/LICENSE.txt) for more information. |
| 80 | + |
| 81 | +## Acknowledgements |
| 82 | + |
| 83 | +* Built with [Mojo](https://github.com/modularml/mojo) created by [Modular](https://github.com/modularml) |
0 commit comments