Updated example, to v2.0.0; added Image2Image to example

This commit is contained in:
DarthAffe committed 2024-07-22 22:07:06 +02:00
1 parent 2895e0e567
commit 743f7d4c86
5 files changed
+115 -116

No files matched your search

@@ -4,7 +4,8 @@ using System.IO;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using StableDiffusion.NET.Helper.Images;
using HPPH;
using HPPH.System.Drawing;
namespace ImageCreationUI.Converter;
@@ -13,7 +14,7 @@ public class ImageToImageSourceConverter : IValueConverter
{
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
Bitmap? bitmap = (value as IImage)?.ToBitmap();
using Bitmap? bitmap = (value as IImage)?.ToBitmap();
if (bitmap == null) return null;
using MemoryStream ms = new();