public IntelligentUpScaleCommand(
RasterImage maskImage,
RasterColor removeObjectColor,
RasterColor preserveObjectColor,
bool useRemoveObjectColor,
bool usePreserveObjectColor,
int newWidth,
int widthUpScalingFactor,
int newHeight,
int heightUpScalingFactor,
int upScalingOrder
)
public:
IntelligentUpScaleCommand(
RasterImage^ maskImage,
RasterColor removeObjectColor,
RasterColor preserveObjectColor,
bool useRemoveObjectColor,
bool usePreserveObjectColor,
int newWidth,
int widthUpScalingFactor,
int newHeight,
int heightUpScalingFactor,
int upScalingOrder
)
__init__(self,maskImage,removeObjectColor,preserveObjectColor,useRemoveObjectColor,usePreserveObjectColor,newWidth,widthUpScalingFactor,newHeight,heightUpScalingFactor,upScalingOrder) # Overloaded constructor
maskImage
RasterImage object that references mask image.
removeObjectColor
RasterColor value that specifies color of the area in the mask image to be removed. It has to be different than the other image colors. If no remove color exists, then pass null.
preserveObjectColor
RasterColor value that specifies color of the area in the mask image to be removed. It has to be different than the other image colors. If no remove color exists, then pass null.
useRemoveObjectColor
True to use the removeObjectColor parameter otherwise it is false.
usePreserveObjectColor
true to use the removeObjectColor parameter otherwise it is false.
newWidth
New width. Range from 1 to width of the image less 1.
widthUpScalingFactor
Number of the upscaling process stages for the new width to be achieved.
newHeight
New height. Range from 1 to height of the image less 1.
heightUpScalingFactor
Number of the upscaling process stages for the new height to be achieved.
upScalingOrder
Flag that determines whether processing will start with the width first and then the height or vice versa. Pass 0 to start with the height or pass 1 to start with the width.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing.SpecialEffects;
public void IntelligentUpScaleCommandExample()
{
// Load an image
RasterCodecs codecs = new RasterCodecs();
codecs.ThrowExceptionsOnInvalidImages = true;
RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Sample3.cmp"));
IntelligentUpScaleCommand command = new IntelligentUpScaleCommand();
command.UpScalingOrder = 1;
command.NewWidth = image.Width + 100;
command.NewHeight = image.Height;
command.UsePreserveObjectColor = false;
command.UseRemoveObjectColor = false;
// Apply the intelligent UpScale on the image.
command.Run(image);
codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir, "IntelligentUpScaleResult.jpg"), RasterImageFormat.Jpeg, 24);
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images";
}
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
Multimedia
Direct Show .NET | C API | Filters
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
Imaging, Medical, and Document
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.