Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gha3mi/forimage
ForImage - A Fortran library for processing and editing PNM images and managing colors.
https://github.com/gha3mi/forimage
color decimal fortran fortran-package-manager hexadecimal hsl hsv image pbm pgm pnm ppm rgb
Last synced: 10 days ago
JSON representation
ForImage - A Fortran library for processing and editing PNM images and managing colors.
- Host: GitHub
- URL: https://github.com/gha3mi/forimage
- Owner: gha3mi
- License: bsd-3-clause
- Created: 2023-07-11T04:54:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-07T23:17:44.000Z (8 months ago)
- Last Synced: 2024-05-08T00:37:10.124Z (8 months ago)
- Topics: color, decimal, fortran, fortran-package-manager, hexadecimal, hsl, hsv, image, pbm, pgm, pnm, ppm, rgb
- Language: Fortran
- Homepage: https://gha3mi.github.io/forimage/
- Size: 5.99 MB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![GitHub](https://img.shields.io/badge/GitHub-ForImage-blue.svg?style=social&logo=github)](https://github.com/gha3mi/forimage)
[![Version](https://img.shields.io/github/release/gha3mi/forimage.svg)](https://github.com/gha3mi/forimage/releases/latest)
[![Documentation](https://img.shields.io/badge/ford-Documentation%20-blueviolet.svg)](https://gha3mi.github.io/forimage/)
[![CI_test](https://github.com/gha3mi/forimage/actions/workflows/CI_test.yml/badge.svg)](https://github.com/gha3mi/forimage/actions/workflows/CI_test.yml)
[![cmake](https://github.com/gha3mi/forimage/actions/workflows/cmake.yml/badge.svg)](https://github.com/gha3mi/forimage/actions/workflows/cmake.yml)
[![CI_doc](https://github.com/gha3mi/forimage/actions/workflows/CI_doc.yml/badge.svg)](https://github.com/gha3mi/forimage/actions/workflows/CI_doc.yml)
[![License](https://img.shields.io/github/license/gha3mi/forimage?color=green)](https://github.com/gha3mi/forimage/blob/main/LICENSE)**ForImage**: A Fortran library for processing and editing PNM images and managing colors.
- [PNM File Support](#pnm-file-support)
- [Color Support](#color-support)
- [fpm dependency](#fpm-dependency)
- [How to run demos](#how-to-run-demos)
- [Using fpm](#using-fpm)
- [Using CMake](#using-cmake)
- [Projects Utilizing ForImage](#projects-utilizing-forimage)
- [API documentation](#api-documentation)
- [Contributing](#contributing)
- [References](#references)## PNM File Support
ForImage offers comprehensive support for PNM files, including creation, importing, and exporting capabilities. It seamlessly handles formats such as `PBM`, `PGM`, and `PPM` in both `ASCII` and `binary` representations.
Available features include:
- Original
- Negative
- Brighten
- Swap Channels
- Remove Channels
- Greyscale
- Rotate
- Flip Horizontal
- Flip Vertical
- Crop
- Resize
## Color Support
ForImage supports different color representations like RGB, CMYK, Decimal, Hexadecimal, HSV, HSL, XYZ, and color names. Users can easily set and retrieve color values, switch between color types, and find the closest matching colors.
## fpm dependency
If you want to use `ForImage` as a dependency in your own fpm project,
you can easily include it by adding the following line to your `fpm.toml` file:```toml
[dependencies]
forimage = {git="https://github.com/gha3mi/forimage.git"}
```## How to run demos
The `demo_ppm` program demonstrates various operations on PPM (Portable Pixmap) images. It generates Mandelbrot fractals, performs diverse manipulations, and exports images in the PPM format.
The `demo_color` program showcases manipulation of color spaces and their conversions. This program sets a custom color using various methods, converts it to different color spaces, retrieves color values, finds the nearest color, and prints color details.
To get started, follow these steps:
**Clone the repository:**
Clone the `ForImage` repository from GitHub using the following command:
```shell
git clone https://github.com/gha3mi/forimage.git
```Navigate to the cloned directory:
```shell
cd forimage
```### Using fpm
Run the `demo_ppm` example:
```shell
fpm run --example demo_ppm
```Run the `demo_color` example:
```shell
fpm run --example demo_color
```### Using CMake
```shell
cmake -B build -D BUILD_FORIMAGE_EXAMPLES=on
``````shell
cmake --build build
```Run the `demo_ppm` example:
```shell
./build/example/demo_ppm
```Run the `demo_color` example:
```shell
./build/example/demo_color
```
Note: The executable must be run from the forimage directory.## Projects Utilizing ForImage
- [ForColormap](https://github.com/vmagnin/forcolormap): A Fortran library for colormaps
- [ForCAD](https://github.com/gha3mi/forcad): A Fortran library for Geometric Modeling using NURBSIf your project utilizes ForImage and you want to be added to this list, please add your project and create a pull request.
## API documentation
The most up-to-date API documentation for the master branch is available
[here](https://gha3mi.github.io/forimage/).
To generate the API documentation for `ForImage` using
[ford](https://github.com/Fortran-FOSS-Programmers/ford) run the following
command:```shell
ford ford.yml
```## Contributing
Contributions to `ForImage` are welcome!
If you find any issues or would like to suggest improvements, please open an issue.## References
- https://en.wikipedia.org/wiki/Netpbm#File_formats