- About Graphics Mill
- What's New?
- Breaking Changes in Graphics Mill 12
- Breaking Changes in Graphics Mill 11
- Features
- Supported File Formats
- System Requirements
- Getting Started
- Working with Image Formats
- Transforming Images (Resize, Rotate, Crop)
- Working with Metadata
- Color Management and Color Reduction
- Drawing Text and Graphics
- Color Keying (Green Screen Removal)
- Channels and Pixel Data
- Color and Tone Correction
- Working with Photoshop (PSD) Files
- Image Filters
- Processing Large Images
- Basics of Image Processing
- Troubleshooting
- Class Library Reference
- Aurigma.GraphicsMill Namespace
- AmbiguousFontCollisionException Class
- Bitmap Class
- BitmapEmptyException Class
- BitmapStatisticsProvider Class
- Channel Enumeration
- ChannelCombiner Class
- ChannelSplitter Class
- ChannelsProvider Class
- CMAdobeModuleLoadException Class
- CMException Class
- CMInappropriateProfileException Class
- CMOpenProfileException Class
- CMTransformException Class
- Cmyk16Color Class
- CmykChannelCombiner Class
- CmykChannelSplitter Class
- CmykColor Class
- CodecAdapter Class
- Color Class
- ColorAdjustmentProvider Class
- ColorManagementProvider Class
- ColorPalette Class
- ColorPaletteEmptyException Class
- ColorPaletteType Enumeration
- ColorProfile Class
- ColorProfileClass Enumeration
- ColorSpace Enumeration
- CompressedImage Class
- CompressedStream Class
- Configuration Class
- DuplicateFamilyStyleException Class
- DuplicateFontAliasException Class
- DuplicatePostscriptNameException Class
- FamilyStyleConflict Class
- FontException Class
- FontMissingException Class
- GMException Class
- GraphicsContainerRasterizer Class
- Grayscale16Color Class
- GrayscaleChannelCombiner Class
- GrayscaleChannelSplitter Class
- GrayscaleColor Class
- Histogram Class
- HistogramMode Enumeration
- IImageDescriptor Interface
- IImageParams Interface
- Image Class
- ImageGenerator Class
- ImageParams Class
- IndexedColor Class
- Ink Class
- InvalidPropertyValueException Class
- InvalidSourceException Class
- Lab16Color Class
- LabChannelCombiner Class
- LabChannelSplitter Class
- LabColor Class
- MissingIndexColorException Class
- ObjectClosedException Class
- ObjectEmptyException Class
- OnInitEventArgs Class
- OutOfMemoryException Class
- Pipeline Class
- PipelineElement Class
- PipelineException Class
- PixelFormat Class
- PostscriptNameConflict Class
- ProgressEventArgs Class
- ProgressReporter Class
- Rational Class
- Rgb16Color Class
- RgbChannelCombiner Class
- RgbChannelSplitter Class
- RgbColor Class
- SehException Class
- SpotColor Class
- TransformException Class
- TransformsProvider Class
- TrialPeriodTimeException Class
- UnexpectedException Class
- Unit Enumeration
- UnitConverter Class
- UnsignedRational Class
- UnsupportedFontException Class
- UnsupportedPixelFormatException Class
- Win32Exception Class
- Aurigma.GraphicsMill.Codecs Namespace
- Aurigma.GraphicsMill.Codecs.ClippingPath Namespace
- Aurigma.GraphicsMill.Codecs.Psd Namespace
- Aurigma.GraphicsMill.Drawing Namespace
- Aurigma.GraphicsMill.Drawing.Art Namespace
- Aurigma.GraphicsMill.Drawing.Effects Namespace
- Aurigma.GraphicsMill.Licensing Namespace
- Aurigma.GraphicsMill.Templates Namespace
- Aurigma.GraphicsMill.Transforms Namespace
- Aurigma.GraphicsMill Namespace
- Licensing
- End User License Agreement
- Copyright Notices
Bitmap.SetPixel Method
Sets the color of the specified pixel in this Bitmap.
Namespace:
Aurigma.GraphicsMill
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Syntax
C#
public void SetPixel(
int x,
int y,
Color color
)
Parameters
- x
-
Type: System.Int32
The x-coordinate of the pixel to set.
- y
-
Type: System.Int32
The y-coordinate of the pixel to set.
- color
-
Type: Aurigma.GraphicsMill.Color
A Color that represents the color to assign to the specified pixel. It is recommended to make sure that this object has the same color space as the bitmap itself. If color spaces are not match (e.g. the bitmap is CMYK and this color is RGB), color will be automatically converted, but no color management will be applied.
Remarks
This method was implemented for easy but slow access to pixels. It works ideally if you need to set one pixel value, for example, when you implement pencil tool.
Examples
C#
bitmap.SetPixel(120, 100, RgbColor.Red);
var color = (RgbColor)(bitmap.GetPixel(100, 80));