Hi. I currently have a problem converting an image to hex code to be displayed in the ZPL code. I've tried many code snippets to no avail
public static string ByteArrayToString(byte[] ba)
{
StringBuilder hex = new StringBuilder(ba.Length * 2);
for (int i = 0; i < ba.Length; i++) // <-- Use for loop is faster than foreach
hex.Append(ba[i].ToString("X2")); // <-- ToString is faster than AppendFormat
return hex.ToString();
}
I am using Net Core 3.1
Any idea how to convert the image?
1 Replies
Hi,
Maybe you could try this method
Thanks,
James