←Select platform

DestinationImage Property

Summary
Gets the resulting image, if InPlace is set to false.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public RasterImage DestinationImage { get; } 
@property (nonatomic, strong, readonly, nullable) LTRasterImage *destinationImage 
public RasterImage getDestinationImage() 
public: 
property RasterImage^ DestinationImage { 
   RasterImage^ get(); 
} 
DestinationImage # get  (ChangeViewPerspectiveCommand) 

Property Value

The resulting image, if InPlace is set to false.

Example
C#
Java
 
import java.io.File; 
import java.io.IOException; 
 
import org.junit.*; 
import org.junit.runner.JUnitCore; 
import org.junit.runner.Result; 
import org.junit.runner.notification.Failure; 
import static org.junit.Assert.*; 
 
import leadtools.*; 
import leadtools.codecs.*; 
import leadtools.imageprocessing.*; 
 
 
public void changeViewPerspectiveCommandExample() { 
   final String LEAD_VARS_IMAGES_DIR = "C:\\LEADTOOLS23\\Resources\\Images"; 
   RasterCodecs codecs = new RasterCodecs(); 
   String srcFileName = combine(LEAD_VARS_IMAGES_DIR, "rgsref.cmp"); 
 
   // Load the source image from disk 
   RasterImage image = codecs.load(srcFileName); 
 
   // Check the view perspective 
   System.out.printf("Original view perspective = %s%n", image.getViewPerspective()); 
 
   // If the view perspective is TopLeft, change to BottomLeft and vise versa 
   RasterViewPerspective viewPerspective = image.getViewPerspective(); 
   if (viewPerspective == RasterViewPerspective.TOP_LEFT) 
      viewPerspective = RasterViewPerspective.BOTTOM_LEFT; 
   else 
      viewPerspective = RasterViewPerspective.TOP_LEFT; 
 
   // Change the image view perspective 
   ChangeViewPerspectiveCommand command = new ChangeViewPerspectiveCommand(); 
   command.setViewPerspective(viewPerspective); 
   command.setInPlace(true); 
 
   command.run(image); 
 
   // Re-check the view perspective 
   assertTrue(image.getViewPerspective() == viewPerspective); 
   System.out.printf("New view perspective = %s%n", image.getViewPerspective()); 
 
   // Clean up 
   image.dispose(); 
   codecs.dispose(); 
} 
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 oldPerspective = image.ViewPerspective; 
   RasterViewPerspective newPerspective = (oldPerspective == RasterViewPerspective.TopLeft) ? 
      RasterViewPerspective.BottomLeft : RasterViewPerspective.TopLeft; 
 
   // Change the image view perspective 
   ChangeViewPerspectiveCommand command = new ChangeViewPerspectiveCommand(); 
   command.ViewPerspective = newPerspective; 
   command.InPlace = false; //generate a new image 
 
   command.Run(image); 
 
   // Re-check the view perspective in both images 
   Assert.IsTrue(image.ViewPerspective == oldPerspective 
      && command.DestinationImage.ViewPerspective == newPerspective); 
 
   // Clean up 
   image.Dispose(); 
   command.DestinationImage.Dispose(); 
   codecs.Dispose(); 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images"; 
} 
Requirements

Target Platforms

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

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