13 TASImage image(
"$ROOTSYS/tutorials/image/rose512.jpg");
14 UInt_t yPixels = image.GetHeight();
15 UInt_t xPixels = image.GetWidth();
16 UInt_t *argb = image.GetArgbArray();
18 TH2D*
h =
new TH2D(
"h",
"Rose histogram",xPixels,-1,1,yPixels,-1,1);
20 for (
int row=0; row<xPixels; ++row) {
21 for (
int col=0; col<yPixels; ++col) {
22 int index = col*xPixels+row;
23 float grey = float(argb[index]&0xff)/256;
24 h->SetBinContent(row+1,yPixels-col,grey);
R__EXTERN TStyle * gStyle
2-D histogram with a double per channel (see TH1 documentation)}
void SetPalette(Int_t ncolors=kBird, Int_t *colors=0, Float_t alpha=1.)
See TColor::SetPalette.