mirror of
https://github.com/DarthAffe/StableDiffusion.NET.git
synced 2026-11-11 03:21:49 +00:00
Updated example, to v2.0.0; added Image2Image to example
This commit is contained in:
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();
|
||||
|
||||
Reference in new issue
Block a user