The Conley-Morse Graphs Software
|
This is a small utility program which decreases in size a PNG file (if necessary) in order to make it fit within the given size. More...
#include <exception>
#include <cstring>
#include <cstdio>
#include "chomp/system/config.h"
#include "chomp/system/textfile.h"
#include "chomp/system/timeused.h"
#include "chomp/system/arg.h"
#include "pngimage.h"
Go to the source code of this file.
Functions | |
int | pngSmall (const char *inName, const char *outName, int maxWidth, int maxHeight, int scalingFactor) |
The main function of the program "pngsmall". More... | |
int | main (int argc, char *argv[]) |
The main procedure of the program. More... | |
Variables | |
const char * | title |
The title of the program which is displayed every time the program is launched. More... | |
const char * | helpinfo |
The help information about the program which is displayed if the program is launched without command-line arguments or with incorrect arguments. More... | |
This is a small utility program which decreases in size a PNG file (if necessary) in order to make it fit within the given size.
Definition in file pngsmall.cpp.
int main | ( | int | argc, |
char * | argv[] | ||
) |
The main procedure of the program.
Returns: 0 = Ok, -1 = Error, 1 = Help displayed, 2 = Wrong arguments.
Definition at line 210 of file pngsmall.cpp.
References helpinfo, pngSmall(), and title.
int pngSmall | ( | const char * | inName, |
const char * | outName, | ||
int | maxWidth, | ||
int | maxHeight, | ||
int | scalingFactor | ||
) |
The main function of the program "pngsmall".
This function downscales the given PNG image and saves the result as another PNG image. The scaling factor is determined on the basis of the provided maximal allowed width and/or height of the image, unless specified explicitly. Returns 0, or throws an error message in case of failure.
Definition at line 87 of file pngsmall.cpp.
Referenced by main().
const char* helpinfo |
The help information about the program which is displayed if the program is launched without command-line arguments or with incorrect arguments.
Definition at line 59 of file pngsmall.cpp.
Referenced by main().
const char* title |
The title of the program which is displayed every time the program is launched.
Definition at line 52 of file pngsmall.cpp.
Referenced by main().