public byte[] MapTone(byte[] source, byte[] map) { //prefer block the ui thread, because that object: "System.Windows.Media.Imaging.BitmapImage" int[][] image = MapTone(PhotoUtilities.DecodeJpegToRaw(ref source), PhotoUtilities.DecodeJpegToRaw(ref map)); return(PhotoUtilities.EncodeRawToJpeg(ref image)); }
public byte[] FilterApply(byte[] source, double[][] filter, double factor, double offset) { int[][] image = FilterApply(PhotoUtilities.DecodeJpegToRaw(ref source), filter, factor, offset); return(PhotoUtilities.EncodeRawToJpeg(ref image)); }
public byte[] CartoonizerImage(byte[] source) { int[][] image = CartoonizerImage(PhotoUtilities.DecodeJpegToRaw(ref source)); return(PhotoUtilities.EncodeRawToJpeg(ref image)); }