mirror of
https://github.com/DarthAffe/StableDiffusion.NET.git
synced 2025-12-12 21:38:45 +00:00
Removed unused method
This commit is contained in:
parent
07a65ead6d
commit
e25d8ad5c9
@ -82,14 +82,6 @@ internal static class ImageHelper
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe Native.Types.sd_image_t* ToSdImagePtr(this IImage image, bool monochrome = false)
|
||||
{
|
||||
Native.Types.sd_image_t* imagePtr = (Native.Types.sd_image_t*)NativeMemory.Alloc((nuint)Marshal.SizeOf<Native.Types.sd_image_t>());
|
||||
imagePtr[0] = image.ToSdImage(monochrome);
|
||||
|
||||
return imagePtr;
|
||||
}
|
||||
|
||||
public static unsafe void Free(this Native.Types.sd_image_t sdImage)
|
||||
{
|
||||
if (sdImage.data == null) return;
|
||||
@ -127,7 +119,7 @@ internal static class ImageHelper
|
||||
{
|
||||
int count = images.Length;
|
||||
|
||||
Native.Types.sd_image_t* imagePtr = (Native.Types.sd_image_t*)NativeMemory.Alloc((nuint)(count * Marshal.SizeOf<Native.Types.sd_image_t>()));
|
||||
Native.Types.sd_image_t* imagePtr = (Native.Types.sd_image_t*)NativeMemory.Alloc((nuint)count, (nuint)Marshal.SizeOf<Native.Types.sd_image_t>());
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
imagePtr[i] = images[i].ToSdImage(monochrome);
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using HPPH;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user