Exemplo n.º 1
0
 public static object Scale(object rawBmp, int newWidth, int newHeight, int algo)
 {
     if (algo != 1)
     {
         throw new NotImplementedException();
     }
     Wax.Util.Images.UniversalBitmap original = (Wax.Util.Images.UniversalBitmap)rawBmp;
     Wax.Util.Images.UniversalBitmap target   = new Wax.Util.Images.UniversalBitmap(newWidth, newHeight);
     target.CreateNewDrawingSession().Draw(original, 0, 0, 0, 0, newWidth, newHeight, original.Width, original.Height).Flush();
     target.ClearBuffer();
     return(target);
 }
Exemplo n.º 2
0
 public static object StartEditSession(object bmpObj)
 {
     Wax.Util.Images.UniversalBitmap bmp = (Wax.Util.Images.UniversalBitmap)bmpObj;
     Wax.Util.Images.UniversalBitmap.DrawingSession session = bmp.CreateNewDrawingSession();
     return(session);
 }