←Select platform

DestinationBitsPerPixel Property

Summary
Gets or sets the bits per pixel for the destination image. The allowed values are 8, 12, or 16.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public int DestinationBitsPerPixel { get; set; } 
@property (nonatomic, assign) NSUInteger destinationBitsPerPixel; 
public int getDestinationBitsPerPixel(); 
public void setDestinationBitsPerPixel( 
   int intValue 
); 
public: 
property int DestinationBitsPerPixel { 
   int get(); 
   void set (    int ); 
} 
DestinationBitsPerPixel # get and set (ShiftDataCommand) 

Property Value

Bits per pixel for the destination image. The allowed values are 8, 12, or 16.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Core; 
 
 
public void ShiftDataCommandExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, @"ImageProcessingDemo\Beauty16.jpg")); 
 
   // Prepare the command 
   ShiftDataCommand command = new ShiftDataCommand(); 
   command.DestinationBitsPerPixel = 8; 
   command.DestinationLowBit = 3; 
   command.SourceLowBit = 2; 
   command.SourceHighBit = 6; 
   // Move 5 bits starting from bit 2 into the high bits of the affected image. 
   command.Run(image); 
   codecs.Save(command.DestinationImage, Path.Combine(LEAD_VARS.ImagesDir, "ShiftDataResult.bmp"), RasterImageFormat.Bmp, 24); 
 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

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

Leadtools.ImageProcessing.Core Assembly

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