Underlay Method (original) (raw)

Summary

Combines two images so that one appears to be an underlying texture for the other.

Syntax

C#

Objective-C

C++/CLI

Java

Python

- (BOOL)underlay:(LTRasterImage *)_underlayImage_ flags:(LTRasterImageUnderlayFlags)_flags_ error:(NSError **)error

def Underlay(self,flags): 

Parameters

underlayImage
The image that will be used as the underlying image. This is the image that appears to be on bottom and is grayscaled as it is combined with the target image.

flags
Indicators of how the underlying image is to be positioned.

Example

This example draws an ellipse on the image.

using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing; using Leadtools.ImageProcessing.Core; using Leadtools.ImageProcessing.Color; using Leadtools.Dicom; using Leadtools.Drawing; using Leadtools.Controls; using Leadtools.Svg; public void UnderlayExample() { RasterCodecs codecs = new RasterCodecs(); RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "IMAGE1.CMP")); // Load underlay image RasterImage underlayImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "ULAY1.BMP")); // Use underlayImage as a tiled underlay for image image.Underlay(underlayImage, RasterImageUnderlayFlags.None); codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir, "IMAGE1_underlay.BMP"), RasterImageFormat.Bmp, 0); image.Dispose(); underlayImage.Dispose(); codecs.Dispose(); } static class LEAD_VARS { public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; }

Leadtools Assembly

Convert(byte[],int,int,int,int,RasterByteOrder,RasterByteOrder,RasterColor[],RasterColor[],int,int,int,RasterConvertBufferFlags) Method

Convert(byte[],int,int,int,int,RasterByteOrder,RasterByteOrder,RasterColor[],RasterColor[],RasterColor16[],RasterColor16[],int,int,int,RasterConvertBufferFlags) Method

Convert(IntPtr,int,int,int,RasterByteOrder,RasterByteOrder,RasterColor[],RasterColor[],int,int,int,RasterConvertBufferFlags) Method

Convert(IntPtr,int,int,int,RasterByteOrder,RasterByteOrder,RasterColor[],RasterColor[],RasterColor16[],RasterColor16[],int,int,int,RasterConvertBufferFlags) Method