# Cannot convert loaded jpeg to bitmap

**URL:** <https://forum.kirupa.com/t/cannot-convert-loaded-jpeg-to-bitmap/302750>\
**Category:** flash\
**Created:** [January 6, 2010, 10:19pm UTC](https://forum.kirupa.com/t/cannot-convert-loaded-jpeg-to-bitmap/302750 "2010-01-06T22:19:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattblubaugh](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@mattblubaugh](https://forum.kirupa.com/u/mattblubaugh)\
**Post date:** [January 6, 2010, 10:19pm UTC](https://forum.kirupa.com/t/cannot-convert-loaded-jpeg-to-bitmap/302750/1 "2010-01-06T22:19:42Z")

</div>

I need help figuring out why I cannot convert a loaded jpeg to a bitmap.

I’ve found similar posts on this forum but the solutions provided are not working for me. I have a very simple example of what I’m trying to do below:

```auto

private function loadImage():void
        {
            var imageLoader:Loader = new Loader();
            
            imageLoader.name = "imageLoader";
            container_mc.imageHolder_mc.insideTop_mc.loadedImage_mc.addChild(imageLoader);
            var req:URLRequest= new URLRequest("images/busi_woman.jpg");
            imageLoader.load(req);
            imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadedImage);
            
        }
        
        /**
         *
         *
         */
         
        private function loadedImage(e:Event):void
        {
            trace("LOADED");
            var loadedImage:Bitmap = Bitmap(e.target.content);
            var dupedImage:Bitmap = new Bitmap(loadedImage.bitmapData);
            
            container_mc.imageHolder_mc.insideTop_mc.loadedImage_mc.getChildByName("imageLoader").contentLoaderInfo.removeEventListener(Event.COMPLETE, loadedImage);
           
            TweenLite.to(e.target.content, .5, {alpha:1, ease:Expo.easeOut});
            
        }

```

For whatever reason I get the error:

```auto
TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Bitmap@3a0926d1 to Function.
    at com.ncnmar.interphaz::People01/loadedImage()

```

Could someone shed some light on this for me?
