C# Class Smrf.WpfGraphicsLib.WpfImageUtil

Utility methods for working with images in WPF.
Afficher le fichier Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Свойство Type Description
m_dScreenDpi Double
m_oCachedErrorImage System.Windows.Media.Imaging.BitmapSource

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
DrawingVisualToRenderTargetBitmap ( System.Windows.Media.DrawingVisual oDrawingVisual, Int32 iWidth, Int32 iHeight ) : System.Windows.Media.Imaging.RenderTargetBitmap

Private Methods

Méthode Description
AssertValid ( ) : void

Method Details

CreateErrorImage() public méthode

public CreateErrorImage ( Int32 widthAndHeight ) : System.Windows.Media.Imaging.BitmapSource
widthAndHeight System.Int32
Résultat System.Windows.Media.Imaging.BitmapSource

DrawingVisualToRenderTargetBitmap() protected méthode

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
Résultat System.Windows.Media.Imaging.RenderTargetBitmap

GetImageSynchronous() public méthode

public GetImageSynchronous ( String uriString ) : System.Windows.Media.Imaging.BitmapSource
uriString String
Résultat System.Windows.Media.Imaging.BitmapSource

GetImageSynchronousHttp() public méthode

public GetImageSynchronousHttp ( Uri uri ) : BitmapImage
uri System.Uri
Résultat System.Windows.Media.Imaging.BitmapImage

GetImageSynchronousIgnoreDpi() public méthode

public GetImageSynchronousIgnoreDpi ( String uriString ) : System.Windows.Media.Imaging.BitmapSource
uriString String
Résultat System.Windows.Media.Imaging.BitmapSource

ResizeImage() public méthode

public ResizeImage ( System.Windows.Media.ImageSource image, Int32 longerDimensionNew ) : System.Windows.Media.Imaging.BitmapSource
image System.Windows.Media.ImageSource
longerDimensionNew System.Int32
Résultat System.Windows.Media.Imaging.BitmapSource

ResizeImage() public méthode

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
Résultat System.Windows.Media.Imaging.BitmapSource

WpfImageUtil() public méthode

Initializes a new instance of the WpfImageUtil class.
public WpfImageUtil ( ) : System
Résultat System

Property Details

m_dScreenDpi protected_oe static_oe property

protected static Double m_dScreenDpi
Résultat Double

m_oCachedErrorImage protected_oe property

protected BitmapSource,System.Windows.Media.Imaging m_oCachedErrorImage
Résultat System.Windows.Media.Imaging.BitmapSource