diff --git a/CMakeLists.txt b/CMakeLists.txt index 22c18a8..ea1b519 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,6 @@ target_link_libraries(imgproc PUBLIC PkgConfig::TURBOJPEG) set_target_properties(imgproc PROPERTIES EXPORT_NAME imgproc) if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) - add_executable(libimg src/main.c) # Assuming you have a main.c + add_executable(libimg src/main.c) target_link_libraries(libimg PRIVATE imgproc) endif() diff --git a/src/filters.c b/src/filters.c index 48e379b..6a74968 100644 --- a/src/filters.c +++ b/src/filters.c @@ -31,8 +31,8 @@ u32_grayscale(const unsigned int clr) unsigned int green = DECODE_G(clr); unsigned int blue = DECODE_B(clr); /* - * WHY: The colors use the REC 601 Standard: Lamens terms they are - * weighed in how the human eye percieves color. So green is the largest + * WHY: The colors use the REC 601 Standard: In layman's terms they are + * weighed in how the human eye perceives color. So green is the largest * because we are more sensitive to green and least to blue. * The Shift_8 is to divide 256 to bring the color value back into range of 0 - 255 @@ -78,7 +78,7 @@ u32_lerp(const unsigned int clr_a, const unsigned int clr_b, const float ratio) /* * A more powerful mix using floating points to more precisely and * smoothly mix colors from 2 pixels. Doesn't really work on PPM images - * because they are whole number pixels. So jpeg are better because the + * because they are whole number pixels. So JPEG are better because the * numbers result in floating point colors. * */ unsigned char blue = @@ -138,9 +138,9 @@ u32_rotl(const unsigned int clr, const int n) * Rotating by 2 will wrap and give: * 0 1 1 1 0 0 0 1 # 1 + 16 + 32 + 64 = 113 * - * This creates a pixelated looking image of random colors while still - * holding the original image's structure under. Almost a distored, - * broken tv look. + * This creates a pixilated looking image of random colors while still + * holding the original image's structure under. Almost a distorted, + * broken TV look. * * N has a max of 8 because any number after 8 results in the bits * shifting negatively due to the wrapping math, which cant happen and @@ -179,7 +179,7 @@ u32_avg_gb(const unsigned int clr) * @brief Blurs column at (x,y) using -radius to radius * @details Starts at the top extreme and moves to the bottom extreme, * taking the pixel and adding each channel. Because each channel is separated - * into their own ints, it adds each int together and at the end divides each + * into their own int, it adds each int together and at the end divides each * channel back below 256 and converts back to one int. * @param[in] src Pointer to buffer image. * @param[in] x Location in the image buffer for column of original pixel @@ -219,7 +219,7 @@ blur_col(const unsigned int* src, const int x, const int y, const PPM* img, * @brief Blurs column at (x,y) using -radius to radius * @details Starts at the left extreme and moves to the right extreme taking the * pixel and adding each channel. Because each channel is separated into their - * own ints, it adds each int together and at the end divides each channel back + * own int, it adds each int together and at the end divides each channel back * below 256 and converts back to one int. * @param[in] src Pointer to buffer image. * @param[in] x Location in the image buffer for column of original pixel