Creates a thumbnail image of this RasterImage.
public RasterImage CreateThumbnail(int thumbnailWidth,int thumbnailHeight,int bitsPerPixel,RasterViewPerspective viewPerspective,RasterSizeFlags sizeFlags)
Public Function CreateThumbnail( _ByVal thumbnailWidth As Integer, _ByVal thumbnailHeight As Integer, _ByVal bitsPerPixel As Integer, _ByVal viewPerspective As Leadtools.RasterViewPerspective, _ByVal sizeFlags As Leadtools.RasterSizeFlags _) As Leadtools.RasterImage
public Leadtools.RasterImage CreateThumbnail(int thumbnailWidth,int thumbnailHeight,int bitsPerPixel,Leadtools.RasterViewPerspective viewPerspective,Leadtools.RasterSizeFlags sizeFlags)
- (nullable LTRasterImage *)createThumbnailWithWidth:(NSInteger)widththumbnailHeight:(NSInteger)heightbitsPerPixel:(NSInteger)bitsPerPixelviewPerspectiveToUse:(LTRasterViewPerspective)viewPerspectivesizeFlags:(LTRasterSizeFlags)sizeFlagserror:(NSError ** )error
public RasterImage createThumbnail(int thumbnailWidth,int thumbnailHeight,int bitsPerPixel,RasterViewPerspective viewPerspective,RasterSizeFlags sizeFlags)
function Leadtools.RasterImage.CreateThumbnail(thumbnailWidth ,thumbnailHeight ,bitsPerPixel ,viewPerspective ,sizeFlags)
public:Leadtools.RasterImage^ CreateThumbnail(int thumbnailWidth,int thumbnailHeight,int bitsPerPixel,Leadtools.RasterViewPerspective viewPerspective,Leadtools.RasterSizeFlags sizeFlags)
thumbnailWidth
The desired maximum width of the thumbnail image in pixels.
thumbnailHeight
The desired maximum height of the thumbnail image in pixels.
bitsPerPixel
The desired bits per pixel.
viewPerspective
The desired view perspective.
sizeFlags
Flags that control the resize operation.
A new RasterImage that is the thumbnail image.
If the image width and height is less than thumbnailWidth and thumbnailHeight, then this method returns a copy of the image in the original size.
If the image width or height is greater than thumbnailWidth and thumbnailHeight, then this method will return the biggest thumbnail it can fit into the dimensions specified by thumbailWidth and thumbnailHeight, keeping the original image aspect ratio.
The result image will always have a resolution of 96 by 96 regardless of the resolution this RasterImage and will never return a thumbnail bigger than the original image.
using Leadtools;using Leadtools.Codecs;using Leadtools.ImageProcessing;using Leadtools.ImageProcessing.Core;using Leadtools.ImageProcessing.Color;using Leadtools.Dicom;using Leadtools.Drawing;using Leadtools.Controls;using LeadtoolsExamples.Common;using Leadtools.Svg;public void CreateThumbnailExample(){RasterCodecs codecs = new RasterCodecs();string srcFileName = Path.Combine(ImagesPath.Path, "image1.cmp");// Load the imageRasterImage srcImage = codecs.Load(srcFileName);// Use the CreateTumbnail method to create a thumbnail of this imageRasterImage thumbnail = srcImage.CreateThumbnail(200, 200, 24, RasterViewPerspective.TopLeft, RasterSizeFlags.Bicubic);Assert.IsTrue(thumbnail.PageCount == 1);// Clean upthumbnail.Dispose();srcImage.Dispose();codecs.Dispose();}
Imports LeadtoolsImports Leadtools.CodecsImports Leadtools.ImageProcessingImports Leadtools.ImageProcessing.CoreImports Leadtools.ImageProcessing.ColorImports Leadtools.ControlsImports Leadtools.DicomImports Leadtools.DrawingImports Leadtools.SvgPublic Sub CreateThumbnailExample()Dim codecs As RasterCodecs = New RasterCodecs()Dim srcFileName As String = Path.Combine(LEAD_VARS.ImagesDir, "image1.cmp")' Load the imageDim srcImage As RasterImage = codecs.Load(srcFileName)' Use the CreateTumbnail method to create a thumbnail of this imageDim thumbnail As RasterImage = srcImage.CreateThumbnail(200, 200, 24, RasterViewPerspective.TopLeft, RasterSizeFlags.Bicubic)Debug.Assert(thumbnail.PageCount = 1)' Clean upthumbnail.Dispose()srcImage.Dispose()codecs.Dispose()End SubPublic NotInheritable Class LEAD_VARSPublic Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"End Class
using Leadtools;using Leadtools.Codecs;using Leadtools.Dicom;using Leadtools.ImageProcessing;using Leadtools.ImageProcessing.Core;using Leadtools.ImageProcessing.Color;using Leadtools.Examples;using Leadtools.Windows.Media;public void CreateThumbnailExample(RasterImage srcImage){// Use the CreateTumbnail method to create a thumbnail of this imageRasterImage thumbnail = srcImage.CreateThumbnail(200, 200, 24, RasterViewPerspective.TopLeft, RasterSizeFlags.Bicubic);Debug.Assert(thumbnail.PageCount == 1);// Clean upthumbnail.Dispose();srcImage.Dispose();}
Imports LeadtoolsImports Leadtools.CodecsImports Leadtools.DicomImports Leadtools.ImageProcessingImports Leadtools.ImageProcessing.CoreImports Leadtools.ImageProcessing.ColorImports Leadtools.Windows.MediaPublic Sub CreateThumbnailExample(ByVal srcImage As RasterImage)' Use the CreateTumbnail method to create a thumbnail of this imageDim thumbnail As RasterImage = srcImage.CreateThumbnail(200, 200, 24, RasterViewPerspective.TopLeft, RasterSizeFlags.Bicubic)Debug.Assert(thumbnail.PageCount = 1)' Clean upthumbnail.Dispose()srcImage.Dispose()End Sub
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
