12345678910111213141516171819202122 |
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- namespace PixiEditor.Models
- {
- public static class BitmapConverter
- {
- public static WriteableBitmap BytesToWriteableBitmap(int currentBitmapWidth, int currentBitmapHeight ,byte[] byteArray)
- {
- WriteableBitmap bitmap = BitmapFactory.New(currentBitmapWidth, currentBitmapHeight);
- bitmap.FromByteArray(byteArray);
- return bitmap;
- }
- }
- }
|