C# 클래스 SEToolbox.ImageLibrary.Effects.PixelEffect

Summary description for Class1.
상속: IPixelEffect
파일 보기 프로젝트 열기: midspace/SEToolbox

공개 메소드들

메소드 설명
Quantize ( Bitmap source ) : Bitmap

Quantize an image and return the resulting output bitmap

보호된 메소드들

메소드 설명
FirstPass ( BitmapData sourceData, int width, int height ) : void

Execute the first pass through the pixels in the image

InitialQuantizePixel ( Color32 pixel ) : void

Override this to process the pixel in the first pass of the algorithm

This function need only be overridden if your quantize algorithm needs two passes, such as an Octree quantizer.

PixelEffect ( bool singlePass ) : System

Construct the effect

If you construct this class with a true value for singlePass, then the code will, when quantizing your image, only call the 'QuantizeImage' function. If two passes are required, the code will call 'InitialQuantizeImage' and then 'QuantizeImage'.

QuantizePixel ( Color32 pixel, Color32 destinationPixel ) : void

Override this to process the pixel in the second pass of the algorithm

SecondPass ( BitmapData sourceData, Bitmap output, int width, int height, Rectangle bounds ) : void

Execute a second pass through the bitmap

메소드 상세

FirstPass() 보호된 메소드

Execute the first pass through the pixels in the image
protected FirstPass ( BitmapData sourceData, int width, int height ) : void
sourceData System.Drawing.Imaging.BitmapData The source data
width int The width in pixels of the image
height int The height in pixels of the image
리턴 void

InitialQuantizePixel() 보호된 메소드

Override this to process the pixel in the first pass of the algorithm
This function need only be overridden if your quantize algorithm needs two passes, such as an Octree quantizer.
protected InitialQuantizePixel ( Color32 pixel ) : void
pixel Color32 The pixel to quantize
리턴 void

PixelEffect() 보호된 메소드

Construct the effect
If you construct this class with a true value for singlePass, then the code will, when quantizing your image, only call the 'QuantizeImage' function. If two passes are required, the code will call 'InitialQuantizeImage' and then 'QuantizeImage'.
protected PixelEffect ( bool singlePass ) : System
singlePass bool If true, the quantization only needs to loop through the source pixels once
리턴 System

Quantize() 공개 메소드

Quantize an image and return the resulting output bitmap
public Quantize ( Bitmap source ) : Bitmap
source System.Drawing.Bitmap The image to quantize
리턴 System.Drawing.Bitmap

QuantizePixel() 보호된 추상적인 메소드

Override this to process the pixel in the second pass of the algorithm
protected abstract QuantizePixel ( Color32 pixel, Color32 destinationPixel ) : void
pixel Color32 The pixel to quantize
destinationPixel Color32
리턴 void

SecondPass() 보호된 메소드

Execute a second pass through the bitmap
protected SecondPass ( BitmapData sourceData, Bitmap output, int width, int height, Rectangle bounds ) : void
sourceData System.Drawing.Imaging.BitmapData The source bitmap, locked into memory
output System.Drawing.Bitmap The output bitmap
width int The width in pixels of the image
height int The height in pixels of the image
bounds System.Drawing.Rectangle The bounding rectangle
리턴 void