private byte[] BuildTest(ZMotifGraphics.ImageOrientationEnum ImageOrientation, ZMotifGraphics.RibbonTypeEnum RibbonType, out string errMsg) { errMsg = string.Empty; byte[] TheImage = null; ZMotifGraphics graphics = null; try { int dataLen = 0; graphics = new ZMotifGraphics(); graphics.InitGraphics(0, 0, ImageOrientation, RibbonType); if (RibbonType != ZMotifGraphics.RibbonTypeEnum.Color) { graphics.ColorProfile = string.Empty; } graphics.DrawRectangle(20, 20, DEFAULT_WIDTH - 40, DEFAULT_HEIGHT - 40, 10, System.Drawing.Color.Black.ToArgb()); graphics.DrawTextString(25, 25, "PRINT TEST", "Arial", 12, ZMotifGraphics.FontTypeEnum.Bold, System.Drawing.Color.Black.ToArgb()); TheImage = graphics.CreateBitmap(out dataLen); return(TheImage); } catch (Exception ex) { TheImage = null; errMsg = ex.StackTrace; } finally { graphics.ClearGraphics(); graphics.CloseGraphics(); graphics = null; } return(null); }