# Load non bundled image

**URL:** <https://forums.fusetools.com/t/load-non-bundled-image/979>\
**Category:** How-to Discussions\
**Created:** [July 23, 2015, 8:58pm UTC](https://forums.fusetools.com/t/load-non-bundled-image/979 "2015-07-23T20:58:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Morten\_Andersson](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/morten_andersson/32/422_2.png) [@Morten\_Andersson](https://forums.fusetools.com/u/Morten_Andersson)\
**Post date:** [July 23, 2015, 8:58pm UTC](https://forums.fusetools.com/t/load-non-bundled-image/979/1 "2015-07-23T20:58:49Z")

</div>

Is is possible to load an image that is not bundled in UX? I’m trying take a picture with the camera, but so far I haven’t been able to actually display this image afterwards. I naively tried something like this, but it’s obviously not the right way, as I get marshalling errors on the filename.

(sorry for code as image, I’m not sure how to format code here) ![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/zUpqCqvhq41q-legacy-files-G7LWgBMyqoNkGiWp-diumXIOS5gvdw7Al-9TkArJR.png)

---

<div class="post-metadata">

**Author:** ![Anders\_Jakob\_Sivesin](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_jakob_sivesin/32/548_2.png) [@Anders\_Jakob\_Sivesin](https://forums.fusetools.com/u/Anders_Jakob_Sivesin)\
**Post date:** [July 23, 2015, 10:47pm UTC](https://forums.fusetools.com/t/load-non-bundled-image/979/2 "2015-07-23T22:47:20Z")

</div>

Sorry for not being able to give you an answer, I would just like to point out that to enter code; skip a line, then tab the entire code secion in: Enter  
Enter  
Tab code here  
Tab more code here  
Tab ect.

Example:

```auto
code here
more code here
ect.

```

And for rounding off a line you can use \< br\>

---

<div class="post-metadata">

**Author:** ![Morten\_Andersson](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/morten_andersson/32/422_2.png) [@Morten\_Andersson](https://forums.fusetools.com/u/Morten_Andersson)\
**Post date:** [July 23, 2015, 11:03pm UTC](https://forums.fusetools.com/t/load-non-bundled-image/979/3 "2015-07-23T23:03:42Z")

</div>

Ah, thanks! Nice to know.

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [July 24, 2015, 10:07am UTC](https://forums.fusetools.com/t/load-non-bundled-image/979/4 "2015-07-24T10:07:36Z")

</div>

Morten Andersson: Support for displaying files from the camera directly is coming in the next release (any time now).

You basically just databind `File` on the image to the file passed to the promise of `takePicture`:

```uno
Camera.takePicture(...).then(function(file) {
module.exports.imageFile.value = file;

});

```

In UX:

```ux
<Image File="{imageFile}" />

```

> Note: the API for `Camera` will change slightly in the next release(s). Keep an eye on the docs

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy/32/480_2.png) [@Cristian\_Karmy](https://forums.fusetools.com/u/Cristian_Karmy)\
**Post date:** [August 4, 2015, 4:14pm UTC](https://forums.fusetools.com/t/load-non-bundled-image/979/5 "2015-08-04T16:14:26Z")

</div>

Im trying to take a picture and display this image… I have this code but my app in Android crashes when I click in the Panel and call the Function “MyFuction”:

```auto
<App Theme="Basic" ClearColor="#eeeeeeff">
    <DockPanel>
        <StatusBarBackground DockPanel.Dock="Top" />

              <JavaScript>

                var Observable = require('FuseJS/Observable');
                var Camera = require('FuseJS/Camera');
                var imageFile = Observable();

                function MyFuction(args) {
                    Camera.takePicture(640, 360).then(function(file) {
                      module.exports.imageFile.value = file;
                    });
                  }

                module.exports = {
                  MyFuction: MyFuction,
                  imageFile: Observable(null)
                };

              </JavaScript>

                  <Panel Background="Red" Width="100%" Height="80." >
                      <Clicked Handler="{MyFuction}" /> </Panel>

            <Image File="{imageFile}" Width="100%" Height="100%" StretchMode="UniformToFill" />

    </DockPanel>
</App>

```

How can I fix it?

Thanks!

---

<div class="post-metadata">

**Author:** ![Anders\_Bondehagen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_bondehagen/32/98_2.png) [@Anders\_Bondehagen](https://forums.fusetools.com/u/Anders_Bondehagen)\
**Post date:** [August 4, 2015, 4:59pm UTC](https://forums.fusetools.com/t/load-non-bundled-image/979/6 "2015-08-04T16:59:41Z")

</div>

The parameters have changed a bit. TakePicture takes an object instead now: `Camera.takePicture({ targetWith:640, targetHeight:360, correctOrientation:true })`

But it shouldn’t crash that hard, will get someone to look at that.

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy/32/480_2.png) [@Cristian\_Karmy](https://forums.fusetools.com/u/Cristian_Karmy)\
**Post date:** [August 4, 2015, 5:18pm UTC](https://forums.fusetools.com/t/load-non-bundled-image/979/7 "2015-08-04T17:18:00Z")

</div>

Thanks! With this code work perfect! 🙂
