Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
gha3mi committed Jan 10, 2024
1 parent 40b85dc commit 2b08ad9
Showing 1 changed file with 19 additions and 33 deletions.
52 changes: 19 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@
- [Color Support](#color-support)
- [fpm dependency](#fpm-dependency)
- [How to run demos](#how-to-run-demos)
- [Running `demo_ppm`](#running-demo_ppm)
- [Using fpm](#using-fpm)
- [Using CMake](#using-cmake)
- [Running `demo_color`](#running-demo_color)
- [Using fpm](#using-fpm-1)
- [Using CMake](#using-cmake-1)
- [Using fpm](#using-fpm)
- [Using CMake](#using-cmake)
- [Projects Utilizing ForImage](#projects-utilizing-forimage)
- [API documentation](#api-documentation)
- [Contributing](#contributing)
Expand Down Expand Up @@ -93,11 +89,16 @@ 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
```
Expand All @@ -108,57 +109,42 @@ Navigate to the cloned directory:
cd forimage
```

### Running `demo_ppm`
### Using fpm

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.

To run `demo_ppm`, execute the following commands:

#### Using fpm
Run the `demo_ppm` example:

```shell
fpm run --example demo_ppm
```

#### Using CMake
Run the `demo_color` example:

```shell
cmake -B ./build -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_TESTING=FALSE -DBUILD_FORIMAGE_EXAMPLES=TRUE
fpm run --example demo_color
```

```shell
cmake --build build/ --config release
```
### Using CMake

```shell
./build/example/demo_ppm
cmake -B build -DBUILD_FORIMAGE_EXAMPLES=ON
```

### Running `demo_color`

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 run `demo_color`, execute the following commands:

#### Using fpm

```shell
fpm run --example demo_color
cmake --build build
```

#### Using CMake
Run the `demo_ppm` example:

```shell
cmake -B ./build -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_Fortran_COMPILER=gfortran -DBUILD_TESTING=FALSE -DBUILD_FORIMAGE_EXAMPLES=TRUE
./build/example/demo_ppm
```

```shell
cmake --build build/ --config release
```
Run the `demo_color` example:

```shell
./build/example/demo_color
```
Note: The executable must be run from the forimage directory.

## Projects Utilizing ForImage

Expand Down

0 comments on commit 2b08ad9

Please sign in to comment.