Beispiel #1
0
        static XIR.Image RemoteRepresentation(AG.Bitmap bitmap, int width, int height)
        {
            if (width != bitmap.Width || height != bitmap.Height)
            {
                bitmap = bitmap.Scale(new System.Drawing.Size(width, height));
            }

            return(new XIR.Image(
                       XIR.ImageFormat.Png,
                       bitmap.ToByteArray(),
                       width,
                       height));
        }
Beispiel #2
0
 public static string ToBase64String(this AG.Bitmap bitmap)
 {
     return(Convert.ToBase64String(bitmap.ToByteArray()));
 }