Logo ROOT  
Reference Guide
imgconv.C File Reference

Detailed Description

View in nbviewer Open in SWAN Open rose512.jpg and save it in the following formats: .png, .gif, .xpm and tiff.

void imgconv()
{
TImage *img = TImage::Open("$ROOTSYS/tutorials/image/rose512.jpg");
if (!img) {
printf("Could not create an image... exit\n");
return;
}
img->WriteImage("rose512.png");
img->WriteImage("rose512.gif");
img->WriteImage("rose512.xpm");
img->WriteImage("rose512.tiff");
}
Author
Valeriy Onuchin

Definition in file imgconv.C.

TImage
Definition: TImage.h:29
TImage::Open
static TImage * Open(const char *file, EImageFileTypes type=kUnknown)
Open a specified image file.
Definition: TImage.cxx:118
TMVA::TMVAGlob::imgconv
void imgconv(TCanvas *c, const TString &fname)
Definition: tmvaglob.cxx:212
TImage::WriteImage
virtual void WriteImage(const char *, EImageFileTypes=TImage::kUnknown)
Definition: TImage.h:115