C# Class Cryptid.CardGenerator

Generates a Cryptid ID card image for a specified candidate
Afficher le fichier Open project: CryptidID/Cryptid Class Usage Examples

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
TrimBitmap ( Bitmap source ) : Bitmap

Trims the whitespace around a bitmap

Method Details

CardGenerator() public méthode

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
Résultat System

Generate() public méthode

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
Résultat void

ImageToBitmap() public méthode

Converts an iText image to a Bitmap
public ImageToBitmap ( Image img ) : Bitmap
img iTextSharp.text.Image The iText image
Résultat System.Drawing.Bitmap