/************************* 
 * Owen Sullivan
 * CPSC 2310-002
 * opsulli@clemson.edu
*************************/

#include "functions.h"

int main(int argc, char **argv) {

    // Check that the correct number of command-line arguments are supplied
    assert(argc == 4);

    // Open file pointers
    FILE *input = fopen(argv[1], "rb");
    FILE *resized = fopen(argv[2], "wb");
    FILE *negative = fopen(argv[3], "wb");

    // Check that file pointers were opened
    assert(input != NULL);
    assert(resized != NULL);
    assert(negative != NULL);

    resizeImage(input, resized);

    // Seek back to the start of the input file pointer
    fseek(input, 0, SEEK_SET);

    negativeImage(input, negative);

    // Close file pointers
    fclose(input);
    fclose(resized);
    fclose(negative);

    return 0;

}