←Select platform

Is this page helpful?

In this page

Offset Property

Summary
Gets or sets the value that indicates the number of pixels the copied image is shifted.
Syntax
C#
C++/CLI
Python
public int Offset { get; set; } 
public: 
property int Offset { 
   int get(); 
   void set (    int ); 
} 
Offset # get and set (FragmentCommand) 

Property Value

Value that indicates the number of pixels the copied image is shifted.

Example
C#
Copied to clipboard
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.SpecialEffects; 
 
 
public void FragmentCommandExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, @"ImageProcessingDemo\NaturalFruits.jpg")); 
 
   // Prepare the command 
   FragmentCommand command = new FragmentCommand(); 
   command.Offset = 4; 
   command.Opacity = 75; 
   command.Run(image); 
   codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24); 
 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

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

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