This project has moved and is read-only. For the latest updates, please go here.
Flip and/or rotate an image.

HRESULT FlipRotate( _In_ const Image& srcImage, _In_ DWORD flags,
    _Out_ ScratchImage& image );

HRESULT FlipRotate( _In_reads_(nimages) const Image* srcImages, _In_ size_t nimages,
    _In_ const TexMetadata& metadata, _In_ DWORD flags,
    _Out_ ScratchImage& result );


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.

Last edited Jun 22, 2015 at 6:57 AM by walbourn, version 6