Skip to content

TiagoGiannotti/C-Practical-Work-2024

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C-Practical-Work-2024 - Uncompressed Image Manipulation

Repository for the practical work of the Programming Topics course - UNLaM (National University of La Matanza).

SummaryKey FeaturesInstallationLicense

Summary

The task involves developing a C program named bmpmanipulator that processes a 24-bit BMP image file based on user-specified modifications provided as command-line arguments. The program should handle various image transformations, including:

-negative: Inverts the colors of the image.

-grayscale: Converts the image to grayscale by averaging the RGB values.

-increase-contrast: Enhances the contrast by 25%.

-decrease-contrast: Reduces the contrast by 25%.

-blue-tone: Increases the blue color intensity by 50%.

-green-tone: Increases the green color intensity by 50%.

-red-tone: Increases the red color intensity by 50%.

-crop: Reduces the image size by 50%, keeping the proportions intact.

-rotate-right: Rotates the image 90 degrees to the right.

-rotate-left: Rotates the image 90 degrees to the left.

-resize: Reduces the image dimensions to 50%, adjusting pixel locations accordingly.

-monochrome: Converts the image to 1-bit depth, representing each pixel as either black or white based on average RGB values.

The program must produce a modified BMP file for each operation, with the resulting files named appropriately. It should read and write BMP headers and pixel data accurately, ensuring proper image manipulation. The modifications should be implemented in the funciones_estudiante.h and funciones_estudiante.c files.

Key Features

  • Flexible Image Transformation
  • Command-Line Interface
  • BMP File Handling
  • Custom Output Naming
  • Image Quality Management
  • Detailed Documentation

Installation

  1. Clone the repository to your device and install the CodeBlocks IDE with MinGW.
  2. Open the files bmpmanipuleitor.cbp (main project) with the CodeBlocks application. These files are located within the cloned repository.
  3. Select the bmpmanipuleitor.cbp project (main project) and compile it in Release mode and Debug mode.
  4. Go to project, set program arguments and set the following arguments:

.\TestImg.exe test_org.bmp --negativo --monocromo --achicar --gris --aumentar-contraste --recortar --rotar-derecha --rotar-izquierda --tonalidad-azul --tonalidad-roja --tonalidad-verde

Additional Material

License

This repository is under MIT License, if you want to see what you are allowed to do with the content of this repository, please visit choosealicense for more information.

About

C project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published