publicIntelligentDownScaleCommand()
PublicFunctionNew()
public:
IntelligentDownScaleCommand();
usingLeadtools;
usingLeadtools.Codecs;
usingLeadtools.ImageProcessing.SpecialEffects;
publicvoidIntelligentDownScaleCommandExample()
{
// Load an image
RasterCodecs codecs =newRasterCodecs();
codecs.ThrowExceptionsOnInvalidImages =true;
RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,"Sample3.cmp"));
IntelligentDownScaleCommand command =newIntelligentDownScaleCommand();
command.DownScalingOrder = 1;
command.NewWidth = image.Width - 100;
command.NewHeight = image.Height;
command.UsePreserveObjectColor =false;
command.UseRemoveObjectColor =false;
// Apply the intelligent downscale on the image.
command.Run(image);
codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir,"IntelligentDownScaleResult.jpg"), RasterImageFormat.Jpeg, 24);
}
staticclassLEAD_VARS
{
publicconststringImagesDir =@"C:\LEADTOOLS21\Resources\Images";
}
ImportsLeadtools
ImportsLeadtools.Codecs
ImportsLeadtools.ImageProcessing.SpecialEffects
PublicSubIntelligentDownScaleCommandExample()
' Load an image
DimCodecsAsRasterCodecs =NewRasterCodecs()
Codecs.ThrowExceptionsOnInvalidImages =True
DimimageAsRasterImage = Codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,"Sample3.cmp"))
DimCommandAsIntelligentDownScaleCommand =NewIntelligentDownScaleCommand()
Command.DownScalingOrder = 1
Command.NewWidth = image.Width - 100
Command.NewHeight = image.Height
Command.UsePreserveObjectColor =False
Command.UseRemoveObjectColor =False
' Apply the intelligent downscale on the image.
Command.Run(image)
Codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir,"IntelligentDownScaleResult.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
联系我们请填写这张表格,我们很快就会回来的l contact you via email.