我正在畫布上工作并在其上加載圖像。如何將圖像分辨率設(shè)置為 640X480 像素?解碼像素高度和解碼像素寬度不起作用。 ImageBrush brush = new ImageBrush(); BitmapImage src = new BitmapImage(new Uri(("C:\\Users\\i2v\\Desktop\\GoogleMapTA.jpg"), UriKind.Relative)); src.DecodePixelHeight = 480; src.DecodePixelWidth = 640; brush.ImageSource = src; // brush.Stretch = Stretch.None; canvas.Background = brush; canvas.Height = src.Height; canvas.Width = src.Width;
設(shè)置畫布上加載的圖像的分辨率 wpf c#
月關(guān)寶盒
2023-07-23 16:51:16