This code is a demo, of this site's code submission feature, which I am using in a job interview

View versions (1)

Interface

Overview

This file contains the various definitions and functions which are needed to resize an image using the local system's installation of ImageMagick.

GPL Licence — free for non commercial use. See Licence details.

DECLARATION

std

If you're writing C++ you really should know what this does.

Author

Vince Cole (June 2009)

DECLARATION

Magick

this namespace contains all the ImageMagick++ API functions

Author

Vince Cole (June 2009)

FUNCTION

dump

Parameters

m
the data structure which we would like to inspect
Author

Vince Cole (June 2009)

FUNCTION

strip_text_delims

cuts out all occurrences of the text delimiter, defined as the constant TEXT_DELIM, from the given string and returns it by reference

Parameters

line
the string we want to modify
Author

Vince Cole (June 2009)

FUNCTION

read_item_key

Parameters

item
the item we want the value of
key
the key to use
m
a structure into which we'll save the data
Author

Vince Cole (June 2009)

FUNCTION

read_item_val

Parameters

item
the item we want the value of
key
which key to use
idx
what index to access the array of stringset
m
the data structure which to save the result to
Author

Vince Cole (June 2009)

FUNCTION

read_line

Parameters

line
the line of text containing the data to parse
m
the data structure which to save the result to
Author

Vince Cole (June 2009)

FUNCTION

read_mfg_thumb_sizes

Parameters

filename
the file containing the data
m
the data structure which to save the result to
Author

Vince Cole (June 2009)

FUNCTION

main

this program accepts input from the command line, for resizing an image, and resizes it

Parameters

argc
the command line argument count
argv
the command line argument values

Returns

program success/failure status
Author

Vince Cole (June 2009)