Create a half-sized subimage
Usage: subimage_tutorial infile outfile
#include <iostream>
#include <vigra/multi_array.hxx>
#include <vigra/stdimage.hxx>
{
{
std::cout <<
"Usage: " <<
argv[0] <<
" infile outfile" << std::endl;
std::cout << "(supported formats: " << impexListFormats() << ")" << std::endl;
return 1;
}
try
{
{
Shape2 upperLeft =
info.shape() / 4,
lowerRight =
info.shape() - upperLeft;
}
else
{
Shape2 upperLeft =
info.shape() / 4,
lowerRight =
info.shape() - upperLeft;
}
}
catch (std::exception & e)
{
std::cout << e.what() << std::endl;
return 1;
}
return 0;
}
Argument object for the function exportImage().
Definition imageinfo.hxx:134
Argument object for the function importImage().
Definition imageinfo.hxx:391
Class for a single RGB value.
Definition rgbvalue.hxx:128
TinyVectorView< VALUETYPE, TO-FROM > subarray() const
Definition tinyvector.hxx:887
image import and export functions