Fixed and rewritten draw using new API, others coming
I broke it when preparing for Github publishing
This commit is contained in:
@ -47,7 +47,7 @@ public class Cards
|
||||
{
|
||||
str += GetName().ToLower();
|
||||
}
|
||||
return @"images/cards/" + str + "_of_" + suit.ToString().ToLower() + ".jpg";
|
||||
return @"./images/cards/" + str + "_of_" + suit.ToString().ToLower() + ".jpg";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -35,5 +37,12 @@ namespace NadekoBot
|
||||
}
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
public static Stream ImageToStream(Image img,ImageFormat format) {
|
||||
MemoryStream stream = new MemoryStream();
|
||||
img.Save(stream, format);
|
||||
stream.Position = 0;
|
||||
return stream;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user