C# Класс Smrf.WpfGraphicsLib.WpfImageUtil

Utility methods for working with images in WPF.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
m_dScreenDpi Double
m_oCachedErrorImage System.Windows.Media.Imaging.BitmapSource

Открытые методы

Метод Описание
CreateErrorImage ( Int32 widthAndHeight ) : System.Windows.Media.Imaging.BitmapSource
GetImageSynchronous ( String uriString ) : System.Windows.Media.Imaging.BitmapSource
GetImageSynchronousHttp ( Uri uri ) : BitmapImage
GetImageSynchronousIgnoreDpi ( String uriString ) : System.Windows.Media.Imaging.BitmapSource
ResizeImage ( System.Windows.Media.ImageSource image, Int32 longerDimensionNew ) : System.Windows.Media.Imaging.BitmapSource
ResizeImage ( System.Windows.Media.ImageSource image, Int32 widthNew, Int32 heightNew ) : System.Windows.Media.Imaging.BitmapSource
WpfImageUtil ( ) : System

Initializes a new instance of the WpfImageUtil class.

Защищенные методы

Метод Описание
DrawingVisualToRenderTargetBitmap ( System.Windows.Media.DrawingVisual oDrawingVisual, Int32 iWidth, Int32 iHeight ) : System.Windows.Media.Imaging.RenderTargetBitmap

Приватные методы

Метод Описание
AssertValid ( ) : void

Описание методов

CreateErrorImage() публичный Метод

public CreateErrorImage ( Int32 widthAndHeight ) : System.Windows.Media.Imaging.BitmapSource
widthAndHeight System.Int32
Результат System.Windows.Media.Imaging.BitmapSource

DrawingVisualToRenderTargetBitmap() защищенный Метод

protected DrawingVisualToRenderTargetBitmap ( System.Windows.Media.DrawingVisual oDrawingVisual, Int32 iWidth, Int32 iHeight ) : System.Windows.Media.Imaging.RenderTargetBitmap
oDrawingVisual System.Windows.Media.DrawingVisual
iWidth System.Int32
iHeight System.Int32
Результат System.Windows.Media.Imaging.RenderTargetBitmap

GetImageSynchronous() публичный Метод

public GetImageSynchronous ( String uriString ) : System.Windows.Media.Imaging.BitmapSource
uriString String
Результат System.Windows.Media.Imaging.BitmapSource

GetImageSynchronousHttp() публичный Метод

public GetImageSynchronousHttp ( Uri uri ) : BitmapImage
uri System.Uri
Результат System.Windows.Media.Imaging.BitmapImage

GetImageSynchronousIgnoreDpi() публичный Метод

public GetImageSynchronousIgnoreDpi ( String uriString ) : System.Windows.Media.Imaging.BitmapSource
uriString String
Результат System.Windows.Media.Imaging.BitmapSource

ResizeImage() публичный Метод

public ResizeImage ( System.Windows.Media.ImageSource image, Int32 longerDimensionNew ) : System.Windows.Media.Imaging.BitmapSource
image System.Windows.Media.ImageSource
longerDimensionNew System.Int32
Результат System.Windows.Media.Imaging.BitmapSource

ResizeImage() публичный Метод

public ResizeImage ( System.Windows.Media.ImageSource image, Int32 widthNew, Int32 heightNew ) : System.Windows.Media.Imaging.BitmapSource
image System.Windows.Media.ImageSource
widthNew System.Int32
heightNew System.Int32
Результат System.Windows.Media.Imaging.BitmapSource

WpfImageUtil() публичный Метод

Initializes a new instance of the WpfImageUtil class.
public WpfImageUtil ( ) : System
Результат System

Описание свойств

m_dScreenDpi защищенное статическое свойство

protected static Double m_dScreenDpi
Результат Double

m_oCachedErrorImage защищенное свойство

protected BitmapSource,System.Windows.Media.Imaging m_oCachedErrorImage
Результат System.Windows.Media.Imaging.BitmapSource