Burned items print fine.

This commit is contained in:
Tim Young 2018-02-14 12:24:54 +00:00
parent d48db428c7
commit 13165c402c

View File

@ -727,7 +727,7 @@ namespace EduNetworkBuilder
/*This overload copies data of /size/ into /data/ from location specified (/Scan0/)*/
System.Runtime.InteropServices.Marshal.Copy(bData.Scan0, OrigImagedata, 0, size);
System.Runtime.InteropServices.Marshal.Copy(bData.Scan0, BurnImagedata, 0, size);
System.Runtime.InteropServices.Marshal.Copy(burnData.Scan0, BurnImagedata, 0, size);
for (int i = 0; i < size; i += bitsPerPixel / 8)
{
@ -735,9 +735,14 @@ namespace EduNetworkBuilder
if (OrigImagedata[i + 3] == 0) //If the original image is transparent, make the burn image transparent
{
BurnImagedata[i + 3] = 0;//Make it transparent
//Console.Write(" " + i);
}
else
{
//Console.Write("no");
}
}
Console.WriteLine("");
/* This override copies the data back into the location specified */
System.Runtime.InteropServices.Marshal.Copy(OrigImagedata, 0, bData.Scan0, OrigImagedata.Length);
System.Runtime.InteropServices.Marshal.Copy(BurnImagedata, 0, burnData.Scan0, OrigImagedata.Length);