-
Notifications
You must be signed in to change notification settings - Fork 437
FlipRotate
DirectXTex |
---|
Flip and/or rotate an image.
HRESULT FlipRotate( const Image& srcImage, TEX_FR_FLAGS flags, ScratchImage& image );
HRESULT FlipRotate( const Image* srcImages, size_t nimages,
const TexMetadata& metadata
TEX_FR_FLAGS flags, ScratchImage& result );
WIC is not supported on Linux or Windows Subsystem for Linux, so these functions are not supported for non-Win32 platforms. WIC2 is supported on Xbox One and Xbox Series X|S.
flags: Combination of options to apply
Optionally a rotation
-
TEX_FR_ROTATE0
Rotate by 0 degrees (no-op) -
TEX_FR_ROTATE90
Rotate by 90 degrees -
TEX_FR_ROTATE180
Rotate by 180 degrees -
TEX_FR_ROTATE270
Rotate by 270 degrees
Optionally a flip
-
TEX_FR_FLIP_HORIZONTAL
Horizonal flip -
TEX_FR_FLIP_VERTICAL
Vertical flip
ScratchImage srcImage;
...
ScratchImage destImage;
hr = FlipRotate( srcImage.GetImages(), srcImage.GetImageCount(),
srcImage.GetMetadata(),
TEX_FR_FLIP_HORIZONTAL, destImage );
if ( FAILED(hr) )
...
This function does not operate directly on block compressed images. See Decompress and Compress.
This function cannot operate directly on a planar format image. See ConvertToSinglePlane for a method for converting planar data to a format that is supported by this routine.
All content and source code for this package are subject to the terms of the MIT License.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
- Universal Windows Platform apps
- Windows desktop apps
- Windows 11
- Windows 10
- Windows 8.1
- Windows 7 Service Pack 1
- Xbox One
- Xbox Series X|S
- Windows Subsystem for Linux
- Visual Studio 2022
- Visual Studio 2019 (16.11)
- clang/LLVM v12 - v18
- GCC 10.5, 11.4, 12.3
- MinGW 12.2, 13.2
- CMake 3.20
DirectX Tool Kit for DirectX 11