38 gROOT->Macro(
"$ROOTSYS/tutorials/visualisation/graphs/gr001_simple.C");
42 TImage *fore = dmp.GetImage();
45 gPad->SetCanvasSize(400, 300);
54 UInt_t rgb1 = color2rgb(bk1);
55 UInt_t rgb2 = color2rgb(bk2);
64 for (
UInt_t i = 0; i <
h; i++) {
65 for (
UInt_t j = 0; j < w; j++) {
66 Int_t idx = i * w + j;
69 UInt_t col = argb[idx] & 0xffffff;
75 if ((col == rgb1) || (col == rgb2)) {
78 argb[idx] = 0xff000000 + col;
84 back->
Merge(fore,
"alphablend", 20, 20);
88 printf(
"*************** File trans_graph.png created ***************\n");
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
Save canvas as an image (GIF, JPEG, PNG, XPM, TIFF etc.).
An abstract interface to image processing library.
static TImage * Open(const char *file, EImageFileTypes type=kUnknown)
Open a specified image file.
virtual UInt_t * GetArgbArray()
virtual UInt_t GetWidth() const
virtual void WriteImage(const char *, EImageFileTypes=TImage::kUnknown)
virtual void Merge(const TImage *, const char *="alphablend", Int_t=0, Int_t=0)
virtual UInt_t GetHeight() const