Click or drag to resize

GH_MemoryBitmap Class

Utility class for ultra-fast bitmap sampling and filters.
Inheritance Hierarchy
SystemObject
  Grasshopper.KernelGH_MemoryBitmap

Namespace:  Grasshopper.Kernel
Assembly:  Grasshopper (in Grasshopper.dll)
Syntax
public sealed class GH_MemoryBitmap

The GH_MemoryBitmap type exposes the following members.

Constructors
  NameDescription
Public methodGH_MemoryBitmap(Bitmap)
Default constructor.
Public methodGH_MemoryBitmap(Bitmap, WrapMode)
Constructor with Wrap mode override.
Top
Properties
  NameDescription
Public propertyHasAlphaChannel
Gets a value indicating whether or not the local image has an alpha channel defined.
Public propertyHeight
Gets the height (in pixels) of the local image.
Public propertySizeOf
Gets the size (in bytes) of the local image.
Public propertyWidth
Gets the width (in pixels) of the local image.
Top
Methods
  NameDescription
Public methodA
Gets the alpha channel value at the given pixel coordinates.
Public methodB
Gets the blue channel value at the given pixel coordinates.
Public methodColour(Int32, Int32)
Gets the colour at the given pixel coordinates.
Public methodColour(Int32, Int32, Color)
Sets the colour at the given pixel coordinates.
Public methodCopyChannel
Copy the contents of one channel into another.
Public methodFilter_AlphaEdges
Set the alpha component on all edges to a specific value.
Public methodFilter_Blur
Blur the image in both directions.
Public methodFilter_Blur(Int32)
Blur the image N times in both directions.
Public methodFilter_Blur(Int32, Int32)
Blur the image in both directions.
Public methodFilter_Blur(Int32, Int32, Int32)
Blur the image N times in both directions.
Public methodFilter_BlurAlpha
Blur the alpha channel of the image N times in both directions.
Public methodFilter_Contrast
Adjust the contrast of a specific channel.
Public methodFilter_DitherPattern
Create a checkerboard dither pattern.
Public methodFilter_DropShadow
Add a drop-shadow to the image. Image is not grown, so if you want the drop shadow to extend beyond the image boundaries, you have to add padding to the image first.
Public methodFilter_Dullify
Reduces contrast based on opacity. This filter pulls all colours towards dull grey, without wrecking drop-shadows.
Public methodFilter_Equalize
Set all the values in a specific channel to a specific value.
Public methodFilter_GreyScale
Convert the image to a greyscale shadow of its former self.
Public methodFilter_GreyScale(Double)
Convert the image to a greyscale shadow of its former self.
Public methodFilter_HueScale
Convert the image to a greyscale representation of the hues.
Public methodFilter_Invert
Invert all values in a specific channel.
Public methodFilter_LumScale
Convert the image to a greyscale representation of the luminance.
Public methodFilter_Multiply(GH_BitmapChannel, Double)
Multiply all values in a specific channel with a specific factor.
Public methodFilter_Multiply(GH_BitmapChannel, Double, Byte)
Multiply all values in a specific channel with a specific factor, using a custom scaling center anchor.
Public methodFilter_SatScale
Convert the image to a greyscale representation of the saturation.
Public methodFilter_Shift
Shift all values in a specific channel with a specific amount.
Public methodFilter_SpectrumScale
Convert the image to a spectral representation of the hues.
Public methodFilter_Tint
Colorize the image using Hue and Saturation from a base colour.
Public methodG
Gets the greeb channel value at the given pixel coordinates.
Public methodOpaqueArea
Find the opaque area of a bitmap. The opaque area is the rectangle that contains pixels with a colour that is not fully transparent.
Public methodStatic memberPadBitmap
Add padding edges around a bitmap.
Public methodR
Gets the red channel value at the given pixel coordinates.
Public methodRelease
Release the locked bits. You must call this function when you are done with this GH_MemoryBitmap instance.
Public methodSample(Double, Double, Color)
Top level sampling function for interpolated sampling.
Public methodSample(Int32, Int32, Color)
Top level sampling function.
Public methodStatic memberShrinkBitmap
Shrink an image by removing all outer columns and rows that contain only fully transparent pixels.
Top
See Also