38 #include <Base/Image/ImageBase.hh>
39 #include <Base/Image/ImageConvert.hh>
40 #include <Base/Image/ImageIO.hh>
45 int main(
int argc,
char *argv[]) {
49 cerr << argv[0] <<
" src image \n";
54 BIASERR(
"error loading image "<<argv[1]);
57 cerr <<
"read "<<argv[1]<<endl;
71 for (
int x=0; x<sizeX; x++) {
72 for (
int y=0; y<sizeY; y++) {
73 imgH.SetPixel(imageHSV.PixelValue(x, y, 0), x, y);
74 imgS.SetPixel(imageHSV.PixelValue(x, y, 1), x, y);
75 imgV.SetPixel(imageHSV.PixelValue(x, y, 2), x, y);
81 BIASERR(
"error writing image ");
86 BIASERR(
"error writing image ");
91 BIASERR(
"error writing image ");
95 cerr<<
"image data written to file"<<endl;
unsigned int GetWidth() const
unsigned int GetHeight() const
static int Save(const std::string &filename, const ImageBase &img, const enum TFileFormat FileFormat=FF_auto, const bool sync=BIAS_DEFAULT_SYNC, const int c_jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool forceNewID=BIAS_DEFAULT_FORCENEWID, const bool &writeMetaData=true)
Export image as file using extrnal libs.
static int Load(const std::string &FileName, ImageBase &img)
first tries a call to Read MIP image and if that fails, tries to Import Image with all other availabl...
static int Convert(BIAS::ImageBase &source, BIAS::ImageBase &dest, enum BIAS::ImageBase::EColorModel targetColorModel, bool bPlanar=false)
main general conversion function, calls desired specialized functions, always initializes the destIma...
HSV, 3 channels, order: hue, sat , value.
This is the base class for images in BIAS.