Segments the image into rectangular or rounded rectangular tiles and fills them with a color chosen randomly from the colors of the tiles pixels.
L_LTIMGSFX_API L_INT L_RomanMosaicBitmap(pBitmap, uTileWidth, uTileHeight, uBorder, uShadowAngle, uShadowThresh, crColor, uFlags)
Pointer to the bitmap handle that references the bitmap to which to apply the effect.
Value that indicates the width of the tile, in pixels. The meaning of the uTileWidth parameter differs according to the flags that are set in the
uFlags member. Possible values are:
|If uFlags contains||uTileWidth represents||Valid Range|
|RMN_RECT||The width of each rectangular tile, in pixels.||1 to the image width / 2, if there is no region. If there is a region, then the range of values is just the region width/2.|
|The radial length of each arc-shaped tile, in pixels||1 to the half of the diagonal of the image, if there is no region. If there is a region, then the range of values is just the half of the diagonal of the region rectangle.|
Value that indicates the height of the tile. The meaning of the uTileHeight parameter differs according to the flags that are set in the
uFlags member. Possible values are:
|If uFlags contains||uTileHeight represents||Valid Range|
|The height of each rectangular tile, in pixels.||1 to the image height / 2, if there is no region. If there is a region, then the range of values is just the region height/2.|
|RMN_CIRC||Will be ignored.||Will be ignored.|
Value that indicates the border width (space between the tiles), in pixels. The valid range is from 1 to 15.
Angle value indicating the direction of the light source that produces the shadow. This member can be used if the RMN_SHADOWRGB flag or the RMN_SHADOWGRAY flag is set. Possible values are:
Value that is used to determine which pixels will be affected by the shadow. Valid values range from 0 through 255. This member will be used if the MSCT_SHADOWRGB flag or the MSCT_SHADOWGRAY flag is set. Pixels with values above this threshold will be affected.
The COLORREF value that specifies the fill color to be used in between the tiles. You can specify a COLORREF value, such as the return value of the Windows RGB macro, or you can use the PALETTEINDEX macro to specify a palette color.
Flags that indicate which type of tiles to draw, whether to apply shadows, and how to apply the shadows when shadowing is used. You can use a bit wise OR ( | ) to specify one flag from each group.
|RMN_RECT||[0x0000] Draw rectangular tiles in a grid. When this flag is used
|RMN_CIRC||[0x0001] Draw rounded rectangular tiles in rings around the center of the bitmap. When this flag is used uTileWidth contains the radial component of the tile in pixels.|
|RMN_BOTH||[0x0002] Draw both rounded rectangular and rectangular tiles. Draw the largest circle that will fit inside the bitmap and fill that with rings of rounded rectangular tiles. Any part of the bitmap that is not covered by the rounded rectangular tiles gets covered with a grid of rectangular tiles.|
|RMN_FLAT||[0x0000] Do not apply shadows.|
|RMN_SHADOWRGB||[0x0010] Apply colored shadows.|
|RMN_SHADOWGRAY||[0x0020] Apply grayscale shadows.|
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
This function does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this function.
Use this function to divide the bitmap into rectangular or rounded rectangular tiles and then fill each tile with a color chosen randomly from the colors of each tiles pixels.
Use the L_MosaicBitmap function to impose a mosaic effect on a bitmap by dividing the bitmap into tiles of a specified size and changing the color of all pixels in each tile to the average color of pixels within the tile.
Use the L_PixelateBitmap function to divide the bitmap into rectangular or arc-shaped cells and then recreate the image by filling those cells with the minimum, maximum, or average pixel value, depending upon the effect that was selected.
Use the L_MosaicTilesBitmap function to make an image look like a mosaic made from tiles. Tiles can be rectangular or arc-shaped, depending upon the coordinate system used to draw the tiles.
Use the L_PointillistBitmap function to convert image colors into randomly placed dots to create a pointillist painting, using a background color to fill the area between dots.
This function can process the whole image or a region of the image. If a bitmap has a region, the effect is applied only to the region.
This function supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available in the Document and Medical Imaging toolkits.
To update a status bar or detect a user interrupt during execution of this function, Refer to L_SetStatusCallback.
This function does not support 32-bit grayscale images. It returns the error code ERROR_GRAY32_UNSUPPORTED if a 32-bit grayscale image is passed to this function.
Roman Mosaic Function - Before
Roman Mosaic Function - After
View additional platform support for this Roman Mosaic function.
Apply the Roman Mosaic effect using rectangular tiles, with gray shadows
BITMAPHANDLE LeadBitmap; /* Bitmap handle for the image */
/* Load a bitmap at its own bits per pixel */
nRet = L_LoadBitmap (MAKE_IMAGE_PATH(TEXT("Image2.jpg")), &LeadBitmap, sizeof(BITMAPHANDLE), 0, ORDER_BGRORGRAY, NULL, NULL);
nRet = L_RomanMosaicBitmap(&LeadBitmap, 15, 15, 5, SHADOW_E, 0, RGB(0,0,0), RMN_BOTH | RMN_SHADOWGRAY);
nRet = L_SaveBitmap(MAKE_IMAGE_PATH(TEXT("Result.BMP")), &LeadBitmap, FILE_BMP, 24, 0, NULL);
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries