| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Windows-only ImageSharp interop sample showing how to edit a System.Drawing.Bitmap through Image.WrapMemory(...).
Run the project from the repository root:
dotnet run --project SixLabors.Samples.ImageSharp.SystemDrawingInterop\SixLabors.Samples.ImageSharp.SystemDrawingInterop.csproj -c ReleaseShows how to wrap externally-owned bitmap memory:
Format24bppRgb stores pixels in BGR byte order, so the sample wraps the locked bitmap as Bgr24 and processes the bitmap in place without copying pixels into a separate ImageSharp-owned buffer.
Wrapped images should only be used with in-place operations. Do not resize a wrapped image: ImageSharp does not own the external buffer and cannot reallocate the System.Drawing.Bitmap storage to match a different width, height, or stride.
Output:
| Back | FazBrowse Home | New Git URL |