About 593,000 results
Open links in new tab
  1. c# - Difference between bitmap and bitmapdata - Stack Overflow

    Feb 22, 2015 · What is the difference between System.Drawing.bitmap and System.Drawing.Imaging.bitmapdata in C#? How to convert them to each other?

  2. How to do Bitmap processing using BitmapData? - Stack Overflow

    Jan 30, 2021 · For changing a bitmap to pure white, I really don't think this is the most efficient way; fairly sure the normal drawing classes have a simple Fill to do this. Also, you should …

  3. any can explain the function of stride in bitmapdata?

    Jun 25, 2012 · Yes, it's necessary. The stride value is the offset from the start of one scan line to the start of the next scan line. If the scan lines are padded, the value is a few bytes more than …

  4. C# Getting the pixel data efficiently from System.Drawing.Bitmap

    Jun 14, 2014 · var bitmapData = scaledBitmap.LockBits(...); var length = bitmapData.Stride * bitmapData.Height; byte[] bytes = new byte[length]; // Copy bitmap to byte[] …

  5. How to access each byte in a bitmap image - Stack Overflow

    Dec 3, 2008 · If you need to access the pixel information, the super-slow but super-easy way is to call the GetPixel and SetPixel methods on your Bitmap object. The super-fast and not-that …

  6. Creating a Bitmap with raw pixel data array in C#

    May 30, 2024 · You seem familiar with how to get the Scan0 pointer, so just create your target bitmap, create bitmapData objects, and feed this function the source and target pointers, …

  7. How do you load a bitmap file into a BitmapData object?

    Mar 11, 2014 · In Flash, the BitmapData object can be used to store bitmaps in RAM, you can later draw them to a MovieClip using the beginBitmapFill () method. How do you load an …

  8. Create Bitmap from a byte array of pixel data - Stack Overflow

    This question is about how to read/write, allocate and manage the pixel data of a Bitmap. Here is an example of how to allocate a byte array (managed memory) for pixel data and creating a …

  9. Is there a good way to convert between BitmapSource and Bitmap?

    As far as I can tell the only way to convert from BitmapSource to Bitmap is through unsafe code... Like this (from Lesters WPF blog): myBitmapSource.CopyPixels(bits, stride, 0); unsafe { fixed ...

  10. c# - Copy Entire Bitmap Data to the byte Array - Stack Overflow

    May 20, 2020 · You don't need to copy row by row if you preserve the stride from the BitmapData object. But if you do copy row per row, you should copy the exact amount of used bytes per …