because sometimes the bbox capture did not capture the canvas properly .

Now when I started working with Tk::Abstract Canvas, this capture does not work properly (both the methods). It mostly captures some partial areas of the AbstractCanvas and not the full.

Is it possible to solve this problem in AbstractCanvas. It would also be great if you can help me getting some other way to capture the canvas in a .jpeg or .tiff or .svg or some format that is more often used (in windows). Presently I am working with Linux but I need to make my code work for windows as well with the capture image of the whole canvas.