41 gROOT->Macro(
"$ROOTSYS/tutorials/graphs/graph.C");
45 TImage *fore = dmp.GetImage();
48 gPad->SetCanvasSize(400, 300);
57 UInt_t rgb1 = color2rgb(bk1);
58 UInt_t rgb2 = color2rgb(bk2);
67 for (
UInt_t i = 0; i <
h; i++) {
68 for (
UInt_t j = 0; j < w; j++) {
72 UInt_t col = argb[idx] & 0xffffff;
78 if ((col == rgb1) || (col == rgb2)) {
81 argb[idx] = 0xff000000 + col;
87 back->
Merge(fore,
"alphablend", 20, 20);
91 printf(
"*************** File trans_graph.png created ***************\n");
virtual UInt_t GetHeight() const
virtual UInt_t GetWidth() const
virtual void WriteImage(const char *, EImageFileTypes=TImage::kUnknown)
virtual UInt_t * GetArgbArray()
An abstract interface to image processing library.
virtual void Merge(const TImage *, const char *="alphablend", Int_t=0, Int_t=0)
Save canvas as an image (GIF, JPEG, PNG, XPM, TIFF etc.).
The color creation and management class.
static TImage * Open(const char *file, EImageFileTypes type=kUnknown)
Open a specified image file.