Windows phone 8.1 从imageview获取图片到BitmapImage
Windows phone 8.1 get image from imageview to BitmapImage
我正在尝试从 -
中获取图像
<Image x:Name="ImagePreview" HorizontalAlignment="Left" Height="492" Margin="10,10,0,0" Stretch="UniformToFill" VerticalAlignment="Top" Width="380" />
ImagePreview 用于预览带有灰度、黑白或裁剪原始图像等滤镜的图像。所有这些的目的是为了节省 phone 编辑后的图像。
非常感谢用户@LovetoCode。要获取图像,您需要从 imagePreview 投射它。
WriteableBitmap newImg = ImagePreview.Source as WriteableBitmap;
或位图:
BitmapImage newImg = ImagePreview.Source as BitmapImage;
我正在尝试从 -
中获取图像<Image x:Name="ImagePreview" HorizontalAlignment="Left" Height="492" Margin="10,10,0,0" Stretch="UniformToFill" VerticalAlignment="Top" Width="380" />
ImagePreview 用于预览带有灰度、黑白或裁剪原始图像等滤镜的图像。所有这些的目的是为了节省 phone 编辑后的图像。
非常感谢用户@LovetoCode。要获取图像,您需要从 imagePreview 投射它。
WriteableBitmap newImg = ImagePreview.Source as WriteableBitmap;
或位图: BitmapImage newImg = ImagePreview.Source as BitmapImage;