thanks
my scroll-bars now appear.
One thing when I send the arguments in resizecontents as mypicwidth and mypicheight, but it not seem that the widget size match these arguments.
Widget size is lesser.
And how i put the image in center.
Should I apply some transformation in drawcontents function but I am not exactly understanding the means of clipx, clipy, clipw and cliph.