A library for reading images in pure* Mojo 🔥
*Not pure Mojo yet, but hopefully soon.
Mimage is a image manipulation library loosely based on Python's Pillow. The goal is to be able to read and write the most popular image formats directly from Mojo.
Basic usage:
import mimage as mi
def main():
tensor = mi.imread("my/png/image.png")
Try out the tests yourself:
mojo -I . tests/test_open_png.mojo
- Read simple 8-bit PNGs
- Read jpegs
- Read more complex PNGs
- Write PNGs
- Write jpegs
- v1.0.0 will be achieved when Mimage can open all the same images as Pillow.
Before creating a new issue, please:
- Check if the issue already exists. If an issue is already reported, you can contribute by commenting on the existing issue.
- If not, create a new issue and include all the necessary details to understand/recreate the problem or feature request.
- Fork the Project
- Create your Feature Branch
- Commit your Changes
- Push to the Branch
- Open a Pull Request
Once your changes are pushed, navigate to your fork on GitHub. And create a pull request against the original fnands/mimage repository.
- Before creating a PR make sure it doesn't break any of the unit-tests. (e.g.
mojo -I . tests/test_open_png.mojo
)- Introducing new big features requires a new test!
- In the pull request, provide a detailed description of the changes and why they're needed. Link any relevant issues.
- If there are any specific instructions for testing or validating your changes, include those as well.
Distributed under the Apache 2.0 License with LLVM Exceptions. See LICENSE and the LLVM License for more information.