/pixmap-ops

PPM image and operations demo

Primary LanguageC++MIT LicenseMIT

pixmap-ops

Image manipulation demos based on the PPM image format.

TODO: Add a representative image for your project here

How to build

Windows

Open git bash to the directory containing this repository.

pixmap-ops $ mkdir build
pixmap-ops $ cd build
pixmap-ops/build $ cmake -G "Visual Studio 16 2019" ..
pixmap-ops/build $ start Pixmap-Ops.sln

Your solution file should contain two projects: pixmap_art and pixmap_test. To run from the git bash command shell,

pixmap-ops/build $ ../bin/Debug/pixmap_test
pixmap-ops/build $ ../bin/Debug/pixmap_art

macOS

Open terminal to the directory containing this repository.

pixmap-ops $ mkdir build
pixmap-ops $ cd build
pixmap-ops/build $ cmake ..
pixmap-ops/build $ make

To run each program from build, you would type

pixmap-ops/build $ ../bin/pixmap_test
pixmap-ops/build $ ../bin/pixmap_art

Image operators

Following features are implemented in PPM Class:

**1. Resize **

Screen Shot 2021-05-05 at 3 12 49 PM

2. Flip Horizontally

Screen Shot 2021-05-05 at 3 37 09 PM

3. Gamma Corrections

  • Gamma = 0.6

Screen Shot 2021-05-05 at 3 41 19 PM

  • Gamma = 2.2

Screen Shot 2021-05-05 at 3 42 21 PM

4. GrayScale

Screen Shot 2021-05-05 at 3 43 49 PM

5. SubImage

Screen Shot 2021-05-05 at 3 44 56 PM

6. Blend and Replace

Screen Shot 2021-05-05 at 3 46 06 PM

Unique features Implemented

1. Rotate 90 degrees

Screen Shot 2021-05-05 at 3 48 04 PM

2. Swirl Color

Screen Shot 2021-05-05 at 3 49 23 PM

3. Invert Colors

Screen Shot 2021-05-05 at 3 50 16 PM

4. Distort

Screen Shot 2021-05-05 at 3 51 31 PM

5. Extract Red, Green and Blue

  • Red

Screen Shot 2021-05-05 at 3 53 00 PM

  • Green

Screen Shot 2021-05-05 at 3 53 19 PM

  • Blue

Screen Shot 2021-05-05 at 3 53 36 PM

6. Lightest

Screen Shot 2021-05-05 at 3 55 22 PM

7. Darkest

Screen Shot 2021-05-05 at 3 55 51 PM

8. Difference

Screen Shot 2021-05-05 at 3 56 08 PM

9. Multiply

Screen Shot 2021-05-05 at 3 56 24 PM

Results

ORIGINAL IMAGE

Screen Shot 2021-05-05 at 4 05 17 PM

Invertion Applied to the Original Image

Screen Shot 2021-05-05 at 4 07 16 PM

Swirl Color applied to Original Image

Screen Shot 2021-05-05 at 4 08 23 PM

Red Extracted from the Original Image

Screen Shot 2021-05-05 at 4 09 35 PM

Green Extracted from the Original Image

Screen Shot 2021-05-05 at 4 10 24 PM

Blue Extracted from the Original Image

Screen Shot 2021-05-05 at 4 11 30 PM

Distortion Applied to the original Image

Screen Shot 2021-05-05 at 4 13 03 PM

Gamma correction applied to the original Image

Screen Shot 2021-05-05 at 4 14 38 PM

Swirl color applied to the Image on which invert color was applied

Screen Shot 2021-05-05 at 4 16 28 PM

Difference applied to the Image on which invert color was applied

Screen Shot 2021-05-05 at 4 17 35 PM

Rotation-90 degees applied to the above image

Screen Shot 2021-05-05 at 4 20 01 PM

Distortion applied after applying difference on color inverted images

Screen Shot 2021-05-05 at 4 22 06 PM