L_INT LBitmap::RomanMosaic(uTileWidth, uTileHeight, uBorder, uShadowAngle, uShadowThresh, crColor, uFlags)
Segments the image into rectangular or rounded rectangular tiles and fills them with a color chosen randomly from the colors of the tiles pixels.
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.|
|RMN_CIRC or RMN_BOTH||The radial length of each rounded rectangular 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|
|RMN_RECT or RMN_BOTH||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 uTileWidth contains the tile width in pixels, and uTileHeight contains the tile height in pixels.|
|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.|
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 LBitmap::Mosaic 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 LBitmap::Pixelate 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 LBitmap::MosaicTiles 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 LBitmap::Pointillist 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.
Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.
To update a status bar or detect a user interrupt during execution of this function, refer to LBase::EnableStatusCallback.
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.
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.
nRet =LeadBitmap.Load(MAKE_IMAGE_PATH(TEXT("ImageProcessingDemo\\Image2.jpg")), 0,ORDER_BGR);
nRet =LeadBitmap.RomanMosaic(15, 15, 5, SHADOW_E, 0, RGB(0,0,0), RMN_RECT | RMN_SHADOWGRAY);