Revision 8ab25493f0a074bb85b050389cb146b7ce527ff0 authored by Fons Rademakers on 29 September 2006, 08:18:19 UTC, committed by Fons Rademakers on 29 September 2006, 08:18:19 UTC
git-svn-id: http://root.cern.ch/svn/root/trunk@16380 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent f029540
galaxy_image.C
void galaxy_image()
{
TCanvas *canv = new TCanvas("image", "n4254", 40, 40, 812, 700);
canv->ToggleEventStatus();
canv->SetRightMargin(0.2);
canv->SetLeftMargin(0.01);
canv->SetTopMargin(0.01);
canv->SetBottomMargin(0.01);
// read the pixel data from file "galaxy.root"
// the size of the image is 401 X 401 pixels
const char *fname = "galaxy.root";
TFile *gal = 0;
if (!gSystem->AccessPathName(fname)) {
gal = TFile::Open(fname);
} else {
printf("accessing %s file from http://root.cern.ch/files\n",fname);
gal = TFile::Open(Form("http://root.cern.ch/files/%s",fname));
}
if (!gal) return;
TImage *img = (TImage*)gal->Get("n4254");
img->Draw();
// open the color editor
img->StartPaletteEditor();
// zoom the image
img->Zoom(80, 80, 250, 250);
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...