←Select platform

IntelligentDownScaleCommand Constructor()

Summary
Initializes a newIntelligentDownScaleCommandclass object with default parameters.
Syntax
C#
VB
C++
PublicFunctionNew()
public:IntelligentDownScaleCommand();
Example
C#
VB
usingLeadtools;usingLeadtools.Codecs;usingLeadtools.ImageProcessing.SpecialEffects;publicvoidIntelligentDownScaleCommandExample(){// Load an imageRasterCodecs 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";}
ImportsLeadtoolsImportsLeadtools.CodecsImportsLeadtools.ImageProcessing.SpecialEffectsPublicSubIntelligentDownScaleCommandExample()' Load an imageDimCodecsAsRasterCodecs =NewRasterCodecs()Codecs.ThrowExceptionsOnInvalidImages =TrueDimimageAsRasterImage = Codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,"Sample3.cmp"))DimCommandAsIntelligentDownScaleCommand =NewIntelligentDownScaleCommand()Command.DownScalingOrder = 1Command.NewWidth = image.Width - 100Command.NewHeight = image.HeightCommand.UsePreserveObjectColor =FalseCommand.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)EndSubPublicNotInheritableClassLEAD_VARSPublicConstImagesDirAsString="C:\LEADTOOLS21\Resources\Images"EndClass
Requirements

Target Platforms

Leadtools.ImageProcessing.SpecialEffects Assembly
188金宝搏的网址客服|Support|Contact Us|Intellectual Property Notices
© 1991-2021LEAD Technologies, Inc.All Rights Reserved.