locked
BitmapRotation can not use when rotate anti clockwise

    Question

  • Hi,

    I need to rebuild image after rotation.

    This is ok when I rotate in clockwise  and use BitmapRotation.Clockwise90Degrees

    var encoder = await BitmapEncoder.CreateAsync(BitmapEncoder.PngEncoderId, fileStream);

      encoder.SetPixelData(
      BitmapPixelFormat.Bgra8,
      BitmapAlphaMode.Ignore,
      (uint)renderTargetBitmap.PixelWidth,
      (uint)renderTargetBitmap.PixelHeight,
       DisplayInformation.GetForCurrentView().LogicalDpi,
       DisplayInformation.GetForCurrentView().LogicalDpi,
       pixelBuffer.ToArray());

       encoder.BitmapTransform.Rotation = BitmapRotation.Clockwise90Degrees;

        await encoder.FlushAsync();

    But there is no anti clockwise value in BitmapRotation.  How to handle this case.

    Thanks

    Wednesday, November 5, 2014 3:39 AM

Answers

  • Clockwise270Degrees is the same as Anticlockwise 90 Degrees.
    • Marked as answer by FireDance Thursday, November 6, 2014 1:19 AM
    Wednesday, November 5, 2014 3:41 AM
    Owner

All replies

  • Clockwise270Degrees is the same as Anticlockwise 90 Degrees.
    • Marked as answer by FireDance Thursday, November 6, 2014 1:19 AM
    Wednesday, November 5, 2014 3:41 AM
    Owner
  • Thanks.
    Thursday, November 6, 2014 1:19 AM