Automatically write flat buffer templates on converion to prevent outdated ones.
This commit is contained in:
parent
315c7bbd79
commit
7ffa8a4045
@ -136,7 +136,6 @@ namespace Toolbox.Library.IO
|
|||||||
var text = WriteJson(obj);
|
var text = WriteJson(obj);
|
||||||
|
|
||||||
var fbsPath = Path.Combine(FlatPath, fbsName);
|
var fbsPath = Path.Combine(FlatPath, fbsName);
|
||||||
if (!File.Exists(fbsPath))
|
|
||||||
File.WriteAllBytes(fbsPath, GetSchema(fbs));
|
File.WriteAllBytes(fbsPath, GetSchema(fbs));
|
||||||
|
|
||||||
var jsonPath = Path.Combine(FlatPath, jsonName);
|
var jsonPath = Path.Combine(FlatPath, jsonName);
|
||||||
|
@ -211,9 +211,7 @@ namespace Toolbox.Library
|
|||||||
Bitmap b = orig;
|
Bitmap b = orig;
|
||||||
if (orig.PixelFormat != PixelFormat.Format32bppArgb)
|
if (orig.PixelFormat != PixelFormat.Format32bppArgb)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"orig.PixelFormat {orig.PixelFormat}");
|
b = new Bitmap(orig.Width, orig.Height, PixelFormat.Format32bppArgb);
|
||||||
b = new Bitmap(orig.Width, orig.Height,
|
|
||||||
System.Drawing.Imaging.PixelFormat.Format32bppArgb);
|
|
||||||
|
|
||||||
using (Graphics gr = Graphics.FromImage(b))
|
using (Graphics gr = Graphics.FromImage(b))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user