Resizing a bitmap physically changes its width and height, and changes the number of bytes required to store the image. This is different from zooming, which mathematically changes the displayed size of the image, without affecting the stored data.
When resizing an image to enlarge it, LEADTOOLS must find enough room to hold the resulting image. If necessary, LEADTOOLS uses virtual memory (disk space treated as memory). On 32- and 64-bit systems, it uses the system's virtual memory.
On a 16-bit system, it looks for memory as follows:
1. |
First it checks the Windows system resources (including 386 Enhanced virtual memory). |
2. |
If the Windows system resources are insufficient, it checks the available space on the disk specified for temporary files (defined using the TEMP or TMP environment variable). |
If there is not enough memory or virtual memory to hold the resulting image, the function returns an error code.
To retrieve resized data one line at a time, use L_GetResizedRowCol. To set up information for the L_GetResizedRowCol function, use L_StartResizeBitmap. When all lines have been processed, you must call L_StopResizeBitmap to free the memory allocated in ppResizeData.
To resize a buffer to a new specified size, use L_Resize. To set up information for the LBuffer::Resize L_Resize function, use L_StartResize. When all lines have been processed, you must call L_StopResize to clean up all data variables and buffers allocated by LBuffer::StartResize L_StartResize and reset all internal variables to their default settings.
To resize the image from an existing bitmap, and put the resized image into a destination bitmap while leaving the original bitmap intact, use L_ResizeBitmap.
To resize a bitmap region by the specified number of pixels, use L_ResizeBitmapRgn.
To resize a bitmap to a new width and height, use L_SizeBitmap.
L_SizeBitmapInterpolate provides additional resizing methods.
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET