Code: Select all
scaledImage = imgHandler->getDicomImage()->createScaledImage( int(left), int(top), int(width), int(height), sWidth, 0, 0, 0, 0 );
For example, if the image is 1760x1760, and I want to get an image of 500 pixels wide, I set sWidth to 500.
The problem is that the maximum value of "width" can be equal to the original image size, in my example 1760. But this way, I cannot get smaller images, for example, I would like to give a "width" of 1760*2 to get an image of half the size. But if I use this value in "width" parameter, the program crashes.
I would like, when the Width parameter is more than the original image size, get the image surrounded by a black border, letting me get images as small as I want.
Hope somebody can help me.