# AS3/AIR - Export horizontally flipped BitmapData

**URL:** <https://forum.kirupa.com/t/as3-air-export-horizontally-flipped-bitmapdata/264191>\
**Category:** flash\
**Created:** [June 23, 2008, 9:26pm UTC](https://forum.kirupa.com/t/as3-air-export-horizontally-flipped-bitmapdata/264191 "2008-06-23T21:26:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhadaway](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@bhadaway](https://forum.kirupa.com/u/bhadaway)\
**Post date:** [June 23, 2008, 9:26pm UTC](https://forum.kirupa.com/t/as3-air-export-horizontally-flipped-bitmapdata/264191/1 "2008-06-23T21:26:49Z")

</div>

I’ve created a little AIR application that captures video from a webcam and exports stills of the video as JPGs. This works fine but I would like to flip the bitmapdata before it is exported so that the exported jpg is a reverse image of the captured video. Any ideas?

---

<div class="post-metadata">

**Author:** ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)\
**Post date:** [June 24, 2008, 12:35am UTC](https://forum.kirupa.com/t/as3-air-export-horizontally-flipped-bitmapdata/264191/2 "2008-06-24T00:35:24Z")

</div>

```auto

var bmd:BitmapData = new BitmapData();
var bm:Bitmap = new Bitmap();

bmd.draw(myVideo);
bm.scaleX = -1;

```

:thumb:

---

<div class="post-metadata">

**Author:** ![bhadaway](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@bhadaway](https://forum.kirupa.com/u/bhadaway)\
**Post date:** [June 24, 2008, 2:07pm UTC](https://forum.kirupa.com/t/as3-air-export-horizontally-flipped-bitmapdata/264191/3 "2008-06-24T14:07:43Z")

</div>

That code only flips the display object. The exported image is still reverse of what I want it to be.

---

<div class="post-metadata">

**Author:** ![guya](https://avatars.discourse-cdn.com/v4/letter/g/f4b2a3/32.png) [@guya](https://forum.kirupa.com/u/guya)\
**Post date:** [June 24, 2008, 3:39pm UTC](https://forum.kirupa.com/t/as3-air-export-horizontally-flipped-bitmapdata/264191/4 "2008-06-24T15:39:17Z")

</div>

Either redraw the bitmap or use this loop:  
[http://forum.java.sun.com/thread.jspa?threadID=574937&messageID=2866672](http://forum.java.sun.com/thread.jspa?threadID=574937&messageID=2866672)
