private static bool CheckFormat(string format, out IBitMatrixDrawer drawer, out ITripMatrixDrawer textDrawer) { textDrawer = new GraphicsTextDrawer(); if (format == null) { LogError("Format required."); drawer = null; return(false); } if (format.Equals("svg", StringComparison.OrdinalIgnoreCase)) { drawer = new SvgDrawer(); return(true); } if (format.Equals("gif", StringComparison.OrdinalIgnoreCase)) { drawer = new Rgb24BitmapDrawer(); return(true); } if (format.Equals("png", StringComparison.OrdinalIgnoreCase)) { drawer = new GraphicsDrawer(); return(true); } if (format.Equals("txt", StringComparison.OrdinalIgnoreCase)) { textDrawer = new GraphicsTextDrawer(); drawer = new GraphicsDrawer(); return(true); } LogError("Format not supported."); drawer = null; textDrawer = null; return(false); }
private static bool CheckFormatAnimation(string format, out IBitMatrixDrawer drawer) { if (format == null) { LogError("Format required."); drawer = null; return(false); } if (format.Equals("gif", StringComparison.OrdinalIgnoreCase)) { // drawer = new GraphicsDrawer(); drawer = new Rgb24BitmapDrawer(); return(true); } LogError("Only gif format is supported for animated QR code."); drawer = null; return(false); }