Skip to content

Instantly share code, notes, and snippets.

@mdubey82
mdubey82 / gist:d5ccb5fe0cd0fd982cf98d36ee96f224
Created June 13, 2023 07:14
BlazorWasm out of memory MRE
@inject IJSRuntime jsRuntime;
<h1>Out of memory test.</h1>
<p role="status">Buffer collection count: @_collectionCount</p>
<button class="btn btn-primary" @onclick="CreateBuffer">Create Buffer</button>
<button class="btn btn-primary" @onclick="CreateBufferFromJs">Create Buffer From Js</button>
<button class="btn btn-primary" @onclick="DestroyBuffer">Destroy Buffer</button>
@code {
private int _collectionCount = 0;
private List<BufferHolder> _bufferHolders = new List<BufferHolder>();
@mdubey82
mdubey82 / BitmapToDicom.cs
Created November 7, 2012 08:48
Create dicom dataset from secondary capture image
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using System.Text;
using Dicom.Imaging;
using Dicom.IO.Buffer;
namespace Dicom
{