←Select platform

InPlace Property

Summary
Determines whether or not the source image is converted in place (or a new image is created).
Syntax
C#
Objective-C
C++/CLI
Java
Python
public bool InPlace { get; set; } 
@property (nonatomic, assign) BOOL inPlace { get; set; } 
public boolean getInPlace() 
public void setInPlace(boolean value) 
public: 
property bool InPlace { 
   bool get(); 
   void set (    bool ); 
} 
InPlace # get and set (ChangeViewPerspectiveCommand) 

Property Value

true to convert the source image in place (no copy will be made). false, to leave the source image unchanged and place the result in the DestinationImage property.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing; 
 
 
public void ChangeViewPerspectiveCommandExample() 
{ 
	RasterCodecs codecs = new RasterCodecs(); 
 
	string srcFileName = Path.Combine(LEAD_VARS.ImagesDir, "Image1.cmp"); 
 
	// Load the source image from disk 
	RasterImage image = codecs.Load(srcFileName); 
 
	// Check the view perspective 
	Console.WriteLine("Original view perspective = {0}", image.ViewPerspective); 
 
	// If the view perspective is TopLeft, change to BottomLeft and vise versa 
	RasterViewPerspective viewPerspective = image.ViewPerspective; 
	if (viewPerspective == RasterViewPerspective.TopLeft) 
		viewPerspective = RasterViewPerspective.BottomLeft; 
	else 
		viewPerspective = RasterViewPerspective.TopLeft; 
 
	// Change the image view perspective 
	ChangeViewPerspectiveCommand command = new ChangeViewPerspectiveCommand(); 
	command.ViewPerspective = viewPerspective; 
	command.InPlace = true; 
 
	command.Run(image); 
 
	// Re-check the view perspective 
	Console.WriteLine("New view perspective = {0}", image.ViewPerspective); 
	Assert.IsTrue(image.ViewPerspective == viewPerspective); 
 
	// Clean up 
	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.