Creates a thumbnail image of this
RasterImage.
Syntax
Parameters
- 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.
Return Value
A new
RasterImage that is the thumbnail image.
Example
Visual Basic | Copy Code |
---|
Public Sub CreateThumbnailExample()
RasterCodecs.Startup()
Dim codecs As RasterCodecs = New RasterCodecs()
Dim srcFileName As String = LeadtoolsExamples.Common.ImagesPath.Path + "image1.cmp"
Dim srcImage As RasterImage = codecs.Load(srcFileName)
Dim thumbnail As RasterImage = srcImage.CreateThumbnail(200, 200, 24, RasterViewPerspective.TopLeft, RasterSizeFlags.Bicubic)
Debug.Assert(thumbnail.PageCount = 1)
thumbnail.Dispose()
srcImage.Dispose()
codecs.Dispose()
RasterCodecs.Shutdown()
End Sub |
C# | Copy Code |
---|
public void CreateThumbnailExample() { RasterCodecs.Startup(); RasterCodecs codecs = new RasterCodecs(); string srcFileName = LeadtoolsExamples.Common.ImagesPath.Path + "image1.cmp"; // Load the image RasterImage srcImage = codecs.Load(srcFileName); // Use the CreateTumbnail method to create a thumbnail of this image RasterImage thumbnail = srcImage.CreateThumbnail(200,200,24,RasterViewPerspective.TopLeft,RasterSizeFlags.Bicubic); Debug.Assert(thumbnail.PageCount == 1); // Clean up thumbnail.Dispose(); srcImage.Dispose(); codecs.Dispose(); RasterCodecs.Shutdown(); } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
See Also