{"id":22820847,"url":"https://github.com/gha3mi/forimage","last_synced_at":"2026-01-11T02:46:49.918Z","repository":{"id":180318819,"uuid":"664937526","full_name":"gha3mi/forimage","owner":"gha3mi","description":"ForImage - A Fortran library for processing and editing PNM images and managing colors.","archived":false,"fork":false,"pushed_at":"2025-03-02T20:10:35.000Z","size":6282,"stargazers_count":3,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-02T20:32:19.080Z","etag":null,"topics":["color","decimal","fortran","fortran-package-manager","hexadecimal","hsl","hsv","image","pbm","pgm","pnm","ppm","rgb"],"latest_commit_sha":null,"homepage":"https://gha3mi.github.io/forimage/","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gha3mi.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2023-07-11T04:54:10.000Z","updated_at":"2025-03-02T20:09:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"6cabd8c5-7090-48f0-b19a-5bc7ecb8232f","html_url":"https://github.com/gha3mi/forimage","commit_stats":{"total_commits":109,"total_committers":3,"mean_commits":"36.333333333333336","dds":0.08256880733944949,"last_synced_commit":"b27dc6dd208e0c4115c45f25cd72b72b34332401"},"previous_names":["gha3mi/forimage"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gha3mi%2Fforimage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gha3mi%2Fforimage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gha3mi%2Fforimage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gha3mi%2Fforimage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gha3mi","download_url":"https://codeload.github.com/gha3mi/forimage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246392379,"owners_count":20769726,"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","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":["color","decimal","fortran","fortran-package-manager","hexadecimal","hsl","hsv","image","pbm","pgm","pnm","ppm","rgb"],"created_at":"2024-12-12T15:42:38.731Z","updated_at":"2026-01-11T02:46:49.912Z","avatar_url":"https://github.com/gha3mi.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub](https://img.shields.io/badge/GitHub-ForImage-blue.svg?style=social\u0026logo=github)](https://github.com/gha3mi/forimage)\n[![Version](https://img.shields.io/github/release/gha3mi/forimage.svg)](https://github.com/gha3mi/forimage/releases/latest)\n[![Documentation](https://img.shields.io/badge/ford-Documentation%20-blueviolet.svg)](https://gha3mi.github.io/forimage/)\n[![Setup Fortran Conda CI/CD](https://github.com/gha3mi/forimage/actions/workflows/CI-CD.yml/badge.svg?branch=main)](https://github.com/gha3mi/forimage/actions/workflows/CI-CD.yml)\n[![codecov](https://codecov.io/gh/gha3mi/forimage/graph/badge.svg?token=Q7FKDYKQAB)](https://codecov.io/gh/gha3mi/forimage)\n[![License](https://img.shields.io/github/license/gha3mi/forimage?color=green)](https://github.com/gha3mi/forimage/blob/main/LICENSE)\n\n**ForImage**: A Fortran library for processing and editing PNM images and managing colors.\n\n- [PNM File Support](#pnm-file-support)\n- [Color Support](#color-support)\n- [fpm dependency](#fpm-dependency)\n- [How to run demos](#how-to-run-demos)\n  - [Using fpm](#using-fpm)\n  - [Using CMake](#using-cmake)\n- [Projects Utilizing ForImage](#projects-utilizing-forimage)\n- [API documentation](#api-documentation)\n- [Contributing](#contributing)\n- [References](#references)\n\n## PNM File Support\n\nForImage 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. \n\nAvailable features include:\n\n- Original\n\n\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/mandelbrot_binary.png\" width=\"400\"\u003e \n\n- Negative\n\n\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/mandelbrot_binary_negative.png\" width=\"400\"\u003e\n\n- Brighten\n\n\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/mandelbrot_binary_brighten.png\" width=\"400\"\u003e\n\n- Swap Channels\n\n\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/mandelbrot_binary_swap.png\" width=\"400\"\u003e\n\n- Remove Channels\n\n\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/mandelbrot_binary_remove.png\" width=\"400\"\u003e\n\n- Greyscale\n\n\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/mandelbrot_binary_greyscale.png\" width=\"400\"\u003e\n\n- Rotate\n\n\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/mandelbrot_binary_rotate.png\" width=\"400\"\u003e\n\n- Flip Horizontal\n\n\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/mandelbrot_binary_flip_horizontal.png\" width=\"400\"\u003e\n\n- Flip Vertical\n\n\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/mandelbrot_binary_flip_vertical.png\" width=\"400\"\u003e\n\n- Crop\n\n\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/mandelbrot_binary_crop.png\" width=\"250\"\u003e\n\n- Resize\n\n\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/mandelbrot_binary_resize.png\" width=\"250\"\u003e\n\n\n## Color Support\n\nForImage 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.\n\n\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/black.png\" width=\"50\"\u003e\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/white.png\" width=\"50\"\u003e\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/blue.png\" width=\"50\"\u003e\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/red.png\" width=\"50\"\u003e\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/yellow.png\" width=\"50\"\u003e\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/gray.png\" width=\"50\"\u003e\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/cyan.png\" width=\"50\"\u003e\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/orange.png\" width=\"50\"\u003e\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/pink.png\" width=\"50\"\u003e\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/gold.png\" width=\"50\"\u003e\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/violet.png\" width=\"50\"\u003e\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/green.png\" width=\"50\"\u003e\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/brown.png\" width=\"50\"\u003e\u003cimg alt=\"demo\" src=\"https://github.com/gha3mi/forimage/raw/main/png_files/magenta.png\" width=\"50\"\u003e\n\n## fpm dependency\n\nIf you want to use `ForImage` as a dependency in your own fpm project,\nyou can easily include it by adding the following line to your `fpm.toml` file:\n\n```toml\n[dependencies]\nforimage = {git=\"https://github.com/gha3mi/forimage.git\"}\n```\n\n## How to run demos\n\nThe `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.\n\nThe `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.\n\nTo get started, follow these steps:\n\n**Clone the repository:**\n\nClone the `ForImage` repository from GitHub using the following command:\n\n```shell\ngit clone https://github.com/gha3mi/forimage.git\n```\n\nNavigate to the cloned directory:\n\n```shell\ncd forimage\n```\n\n### Using fpm\n\nRun the `demo_ppm` example:\n\n```shell\nfpm run --example demo_ppm\n```\n\nRun the `demo_color` example:\n\n```shell\nfpm run --example demo_color\n```\n\n### Using CMake\n\n```shell\ncmake -B build -D BUILD_FORIMAGE_EXAMPLES=on\n```\n\n```shell\ncmake --build build\n```\n\nRun the `demo_ppm` example:\n\n```shell\n./build/example/demo_ppm\n```\n\nRun the `demo_color` example:\n\n```shell\n./build/example/demo_color\n```\nNote: The executable must be run from the forimage directory.\n\n## Status\n\n\u003c!-- STATUS:setup-fortran-conda:START --\u003e\n| Compiler   | macos | ubuntu | windows |\n|------------|----------------------|----------------------|----------------------|\n| `flang-new` | - | fpm ✅  cmake ✅ | fpm ❌  cmake ❌ |\n| `gfortran` | fpm ✅  cmake ✅ | fpm ✅  cmake ✅ | fpm ✅  cmake ✅ |\n| `ifx` | - | fpm ✅  cmake ✅ | fpm ✅  cmake ✅ |\n| `lfortran` | fpm ❌  cmake ❌ | fpm ❌  cmake ❌ | fpm ❌  cmake ❌ |\n| `nvfortran` | - | fpm ✅  cmake ✅ | - |\n\u003c!-- STATUS:setup-fortran-conda:END --\u003e\n\n## Projects Utilizing ForImage\n\n- [ForColormap](https://github.com/vmagnin/forcolormap): A Fortran library for colormaps\n- [ForCAD](https://github.com/gha3mi/forcad): A Fortran library for Geometric Modeling using NURBS\n\nIf your project utilizes ForImage and you want to be added to this list, please add your project and create a pull request.\n\n## API documentation\n\nThe most up-to-date API documentation for the master branch is available\n[here](https://gha3mi.github.io/forimage/).\nTo generate the API documentation for `ForImage` using\n[ford](https://github.com/Fortran-FOSS-Programmers/ford) run the following\ncommand:\n\n```shell\nford README.md\n```\n\n## Contributing\n\nContributions to `ForImage` are welcome!\nIf you find any issues or would like to suggest improvements, please open an issue.\n\n## References\n\n- https://en.wikipedia.org/wiki/Netpbm#File_formats\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgha3mi%2Fforimage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgha3mi%2Fforimage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgha3mi%2Fforimage/lists"}