←Select platform

MemoryInformation Property

Summary
Gets or sets information about the memory allocated for the image data.
Syntax
C#
C++/CLI
Java
Python
public RasterImageMemoryInformation MemoryInformation { get; set; } 
public RasterImageMemoryInformation getMemoryInformation(); 
public void setMemoryInformation( 
   RasterImageMemoryInformation rasterImageMemoryInformation 
); 
public: 
property RasterImageMemoryInformation MemoryInformation { 
   RasterImageMemoryInformation get(); 
   void set (    RasterImageMemoryInformation ); 
} 
MemoryInformation # get and set (RasterImage) 

Property Value

Information about the memory allocated for the image data.

Remarks

Refer to RasterImageMemoryInformation for description of the different memory modules used by LEADTOOLS when allocating images.

For more information, refer to Memory Storage Types for Images.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing; 
 
 
public void CloneCommandExample() 
{ 
	RasterCodecs codecs = new RasterCodecs(); 
 
	string srcFileName = Path.Combine(LEAD_VARS.ImagesDir, "Image1.cmp"); 
 
	// Load the source image from disk 
	RasterImage image = codecs.Load(srcFileName); 
 
	// Clone it, first, into conventional memory 
	CloneCommand command = new CloneCommand(); 
	command.CreateFlags = RasterMemoryFlags.Conventional; 
	command.Run(image); 
 
	RasterImage destImage1 = command.DestinationImage; 
 
	// Make sure it is in conventional memory 
	Console.WriteLine("Memory is: {0}", destImage1.MemoryInformation.MemoryFlags); 
 
	// Clone it again this time to disk memory 
	command.CreateFlags = RasterMemoryFlags.Disk; 
	command.Run(image); 
 
	RasterImage destImage2 = command.DestinationImage; 
 
	// Make sure it is in disk memory 
	Console.WriteLine("Memory is: {0}", destImage2.MemoryInformation.MemoryFlags); 
 
	// Clean Up 
	destImage1.Dispose(); 
	destImage2.Dispose(); 
	image.Dispose(); 
	codecs.Dispose(); 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 22.0.2023.5.16
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.