C# Класс Cryptid.CardGenerator

Generates a Cryptid ID card image for a specified candidate
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CardGenerator ( Candidate cardCandidate, string pdfTemplateFile ) : System

Creates a new CardGenerator instance

Generate ( string outputFile, byte chainId ) : void

Generates the Cryptid ID card

ImageToBitmap ( Image img ) : Bitmap

Converts an iText image to a Bitmap

Приватные методы

Метод Описание
TrimBitmap ( Bitmap source ) : Bitmap

Trims the whitespace around a bitmap

Описание методов

CardGenerator() публичный Метод

Creates a new CardGenerator instance
public CardGenerator ( Candidate cardCandidate, string pdfTemplateFile ) : System
cardCandidate Candidate The candidate to create the card for
pdfTemplateFile string The PDF template to generate the card
Результат System

Generate() публичный Метод

Generates the Cryptid ID card
public Generate ( string outputFile, byte chainId ) : void
outputFile string The locaton to output the Cryptid ID
chainId byte The chainId of this candidate
Результат void

ImageToBitmap() публичный Метод

Converts an iText image to a Bitmap
public ImageToBitmap ( Image img ) : Bitmap
img iTextSharp.text.Image The iText image
Результат System.Drawing.Bitmap