ROOT
6.14/05
Reference Guide
tutorials
image
pad2png.C File Reference
Tutorials
»
Image tutorials
Detailed Description
Create a canvas and save as png.
void
pad2png()
{
TCanvas
*c =
new
TCanvas
;
TH1F
*h =
new
TH1F
(
"gaus"
,
"gaus"
, 100, -5, 5);
h->
FillRandom
(
"gaus"
, 10000);
h->
Draw
();
gSystem
->
ProcessEvents
();
TImage
*img =
TImage::Create
();
img->
FromPad
(c);
img->
WriteImage
(
"canvas.png"
);
}
Author
Valeriy Onuchin
Definition in file
pad2png.C
.