Modified from the tutorials directory, I have been trying to figure out for a couple of days how to draw a circle over an image, and this is what I got, modified from rose_image.C:
TCanvas *c1;
void rose_image()
{
TImage *img = TImage::Open(“rose512.jpg”);
c1 = new TCanvas(“rose512”, “examples of image manipulations”, 760, 900);
img->DrawLine(10,100,100,10, “#0000ff”, 0);
img->DrawCircle(40,40,8,"#00ff00",1);
img->Draw();
}
If I comment out DrawLine, I get a Bus error on my mac (OS X 10.4, intel, root 5.18, gcc 4.01), and on my ubuntu machine it doesn’t work either (Ubuntu Hardy, gcc 4.2.3, kernel 2.6.24-17, P4 Xeon). If I do DrawLine first, it works on both machines.