public ColorResolutionCommandPaletteFlags PaletteFlags { get; set; } @property (nonatomic, assign) LTColorResolutionCommandPaletteFlags paletteFlags; public ColorResolutionCommandPaletteFlags getPaletteFlags()public void setPaletteFlags(ColorResolutionCommandPaletteFlags value)
public:property ColorResolutionCommandPaletteFlags PaletteFlags {ColorResolutionCommandPaletteFlags get();void set ( ColorResolutionCommandPaletteFlags );}
PaletteFlags # get and set (CodecsThumbnailOptions)
The palette flags to use. The default value is None.
The PaletteFlags will be passed to ColorResolutionCommand internally when MaintainAspectRatio is true, ForceSize is true, and the source image is not 24-bit. In this case, the thumbnail image is converted to 24-bit, then, combined with a "background" image. The resulting image is then returned to the thumbnail image's original bit-depth using PaletteFlags.
using Leadtools;using Leadtools.Codecs;using Leadtools.ImageProcessing;using Leadtools.ImageProcessing.Color;using Leadtools.Svg;public void ReadThumbnailExample(){RasterCodecs codecs = new RasterCodecs();string srcFileName = Path.Combine(LEAD_VARS.ImagesDir, "Image1.cmp");// Create a thumbnail with default optionsCodecsThumbnailOptions options = CodecsThumbnailOptions.Default;options.LoadStamp = false;RasterImage thumbnail = codecs.ReadThumbnail(srcFileName, options, 1);Debug.WriteLine("Thumbnail with default option:");Debug.WriteLine(" Size: {0} by {1} pixels. Bits/Pixel: {2}", thumbnail.Width, thumbnail.Height, thumbnail.BitsPerPixel);thumbnail.Dispose();// Create a thumbnail with some optionsoptions.LoadStamp = false;options.Width = 40;options.Height = 80;options.ForceSize = true;options.MaintainAspectRatio = false;options.BackColor = RasterColor.FromKnownColor(RasterKnownColor.LightBlue);options.BitsPerPixel = 8;options.DitheringMethod = RasterDitheringMethod.None;options.Order = RasterByteOrder.Rgb;options.PaletteFlags = ColorResolutionCommandPaletteFlags.None;options.Resample = false;thumbnail = codecs.ReadThumbnail(srcFileName, options, 1);Debug.WriteLine("Thumbnail with set option (size: {0} by {1}, Bits/Pixel: {2}, ForeSize: {3}",options.Width, options.Height, options.BitsPerPixel, options.ForceSize);Debug.WriteLine(" Size: {0} by {1} pixels. Bits/Pixel: {2}", thumbnail.Width, thumbnail.Height, thumbnail.BitsPerPixel);thumbnail.Dispose();codecs.Dispose();}static class LEAD_VARS{public const string ImagesDir = @"C:\LEADTOOLS22\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
