lab_debug
Disastrous Debugging
sketchify.cpp File Reference

Implementation of the sketchify function. More...

Functions

PNGsetupOutput (unsigned w, unsigned h)
 Creates a new output image. More...
 
HSLAPixelmyFavoriteColor ()
 Used to customize the color of the sketchified image. More...
 
void sketchify (std::string inputFile, std::string outputFile)
 Reads in an image, runs a simple "sketchify" algorithm on it to highlight edges in the image, and then writes the resulting image back out to a specified file. More...
 

Detailed Description

Implementation of the sketchify function.

Function Documentation

◆ myFavoriteColor()

HSLAPixel* myFavoriteColor ( )

Used to customize the color of the sketchified image.

Returns
a pointer to the color to use when sketchifying

◆ setupOutput()

PNG* setupOutput ( unsigned  w,
unsigned  h 
)

Creates a new output image.

Parameters
wwidth of the image
hheight of the image
Returns
a pointer to the newly-created image

◆ sketchify()

void sketchify ( std::string  inputFile,
std::string  outputFile 
)

Reads in an image, runs a simple "sketchify" algorithm on it to highlight edges in the image, and then writes the resulting image back out to a specified file.

Parameters
inputFilethe name of the PNG file to sketchify
outputFilethe name of the file where the output will be written