publicLeadPointSourcePoint {get;set; }
PublicPropertySourcePointAsLeadPoint
@property (nonatomic, assign) LeadPoint sourcePoint
publicLeadPoint getSourcePoint()
publicvoidsetSourcePoint(LeadPoint value)
LeadPoint structure that contain the origin of the source rectangle. the Width and Height are the same Width and Height for the destination rectangle.
Run theAlphaBlendCommandon an image.
usingLeadtools;
usingLeadtools.Codecs;
usingLeadtools.ImageProcessing.Effects;
publicvoidSourcePointPropertyExample()
{
// Load an image
RasterCodecs codecs =newRasterCodecs();
codecs.ThrowExceptionsOnInvalidImages =true;
RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,"Master.jpg"));
// Prepare the command
RasterImage srcImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,@"ImageProcessingDemo\Image3.cmp"), 24, CodecsLoadByteOrder.Bgr, 1, 1);
AlphaBlendCommand command =newAlphaBlendCommand();
// Combine srcImage with image, with half opacity.
//command.DestinationRectangle = new LeadRect(image.Width / 2 - srcImage.Width / 2, image.Height / 2 - srcImage.Height / 2, image.Width / 2 + srcImage.Width / 8, image.Height / 2 + srcImage.Height / 8);
command.DestinationRectangle =newLeadRect(image.Width / 8, image.Height / 8, image.Width, image.Height);
command.SourceImage = srcImage;
command.SourcePoint =newLeadPoint(0, 0);
command.Opacity = 128;
command.Run(image);
codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir,"Result.jpg"), RasterImageFormat.Jpeg, 24);
}
staticclassLEAD_VARS
{
publicconststringImagesDir =@"C:\LEADTOOLS21\Resources\Images";
}
ImportsLeadtools
ImportsLeadtools.Codecs
ImportsLeadtools.ImageProcessing.Effects
PublicSubSourcePointPropertyExample()
DimcodecsAsNewRasterCodecs()
codecs.ThrowExceptionsOnInvalidImages =True
DimleadImageAsRasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,"Master.jpg"))
' Prepare the command
DimsrcImageAsRasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,"ImageProcessingDemo\image3.cmp"), 24, CodecsLoadByteOrder.Bgr, 1, 1)
Dim左AsInteger=CType((leadImage.Width / 8),Integer)
DimTopAsInteger=CType((leadImage.Height / 8),Integer)
DimWidthAsInteger=CType((leadImage.Width),Integer)
DimHeightAsInteger=CType((leadImage.Height),Integer)
' Combine srcImage with image, with half opacity.
DimcommandAsAlphaBlendCommand =NewAlphaBlendCommand
command.DestinationRectangle =NewLeadRect(Left, Top, Width, Height)
command.SourceImage = srcImage
command.SourcePoint =NewLeadPoint(0, 0)
command.Opacity = 128
command.Run(leadImage)
codecs.Save(leadImage, Path.Combine(LEAD_VARS.ImagesDir,"Result.jpg"), RasterImageFormat.Jpeg, 24)
EndSub
PublicNotInheritableClassLEAD_VARS
PublicConstImagesDirAsString="C:\LEADTOOLS21\Resources\Images"
EndClass
Help Collections
Raster.NET|C API|C++ Class Library|HTML5 JavaScript
Document.NET|C API|C++ Class Library|HTML5 JavaScript
Medical.NET|C API|C++ Class Library|HTML5 JavaScript
Medical Web Viewer.NET
188宝金博怎么下载
Media Foundation.NET|C API|Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.