BitmapSizeOptions.FromWidthAndHeight(Int32, Int32) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Initialise une instance de BitmapSizeOptions ce qui ne conserve pas le rapport d’aspect bitmap d’origine.
public:
static System::Windows::Media::Imaging::BitmapSizeOptions ^ FromWidthAndHeight(int pixelWidth, int pixelHeight);
public static System.Windows.Media.Imaging.BitmapSizeOptions FromWidthAndHeight(int pixelWidth, int pixelHeight);
static member FromWidthAndHeight : int * int -> System.Windows.Media.Imaging.BitmapSizeOptions
Public Shared Function FromWidthAndHeight (pixelWidth As Integer, pixelHeight As Integer) As BitmapSizeOptions
Paramètres
- pixelWidth
- Int32
Largeur, en pixels, de la bitmap résultante.
- pixelHeight
- Int32
Hauteur, en pixels, de la bitmap résultante.
Retours
Nouvelle instance de BitmapSizeOptions.
Exceptions
Se produit lorsqu’il pixelHeight est inférieur à zéro.
Remarques
La bitmap résultante a une taille effective de pixelHeight × pixelWidth.
La propriété retournée est définie sur , PreservesAspectRatiofalsesa valeur définie sur , sa PixelHeight valeur définie sur la valeur pixelHeight, et sa PixelWidth valeur définie sur la valeur de pixelWidth.Rotate0RotationBitmapSizeOptions