L_SetBitmapMemoryInfo

#include "l_bitmap.h"

L_LTKRN_API L_INT L_SetBitmapMemoryInfo(pBitmap, uMemory, uTileSize, uTotalTiles, uConvTiles, uMaxTileViews, uTileViews, uFlags)

Sets the bitmap allocation parameters.

Parameters

pBITMAPHANDLE pBitmap

Pointer to the bitmap handle that references the bitmap for which to set the allocation parameters. It cannot be NULL and it must be allocated.

L_UINT uMemory

Value that represents the new memory type for the bitmap. This parameter is used only if SETMEM_MEMORY is set in uFlags.

L_SSIZE_T uTileSize

Value that represents the new size for the tile. This parameter is used only if SETMEM_TILESIZE is set in uFlags.

L_UINT uTotalTiles

Value that represents the new number of tiles. This parameter is used only if SETMEM_TOTALTILES is set in uFlags.

L_UINT uConvTiles

Value that represents the new number of conventional tiles. This parameter is used only if SETMEM_CONVTILES is set in uFlags.

L_UINT uMaxTileViews

Value that represents the new maximum number of swap buffers for the disk tiles. This parameter is used only if SETMEM_MAXTILEVIEWS is set in uFlags.

L_UINT uTileViews

Value that represents the new number of swap buffers for the disk tiles. This parameter is used only if SETMEM_TILEVIEWS is set in uFlags.

L_UINT uFlags

Flags that indicate which parameters should be considered valid. Possible values are one or an OR-ed combination of the following:

Value Meaning
SETMEM_MEMORY [0x0001] uMemory is valid
SETMEM_TILESIZE [0x0002] uTileSize is valid
SETMEM_TOTALTILES [0x0004] uTotalTiles is valid
SETMEM_CONVTILES [0x0008] uConvTiles is valid
SETMEM_MAXTILEVIEWS [0x0010] uMaxTileViews is valid
SETMEM_TILEVIEWS [0x0020] uTileViews is valid

Comment

If uMemory is valid and is not TYPE_TILED, then the other parameters are ignored. If uMemory is not valid and the bitmap is not tiled, then the other parameters are ignored. This overrides the uFlags parameter.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

See Also

Functions

Topics

Example

L_INT SetBitmapMemoryInfoExample(pBITMAPHANDLE pBitmap) 
{ 
   L_INT nRet; 
   // change the tiled bitmap so is can use as many cache buffers as possible:  
   nRet = L_SetBitmapMemoryInfo(pBitmap, 
                         0,          // uMemory 
                         0,          // uTileSize 
                         0,          // uTotalTiles 
                         0,          // uConvTiles 
                         (L_UINT)-1, // uMaxTileViews,  
                         (L_UINT)-1, // uTileViews,  
                         SETMEM_MAXTILEVIEWS | SETMEM_TILEVIEWS); 
   if(nRet != SUCCESS) 
      return nRet; 
   return SUCCESS; 
} 
Help Version 21.0.2023.2.15
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.