# Problem with Taking pictures and upload to Parse

**URL:** <https://forums.fusetools.com/t/problem-with-taking-pictures-and-upload-to-parse/3777>\
**Category:** Bug Reports\
**Created:** [August 5, 2015, 3:21pm UTC](https://forums.fusetools.com/t/problem-with-taking-pictures-and-upload-to-parse/3777 "2015-08-05T15:21:40Z")\
**Posts on this page:** 3\
**Page:** 1

<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 5, 2015, 3:21pm UTC](https://forums.fusetools.com/t/problem-with-taking-pictures-and-upload-to-parse/3777/1 "2015-08-05T15:21:40Z")

</div>

I create a test app to take a picture, upload to Parse and display on screen. The app work perfect but I have some problems:

1. When I take the picture and the camera closes the app shows again but with a graphic error:

 ![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/8RdsZGSiD6MT-legacy-files-DfgdmofSvDNvKdq3-C1BETYJxnsoD2yWXAPdk201e.png)

I notice that the error it gets fixed when I rotate the screen.

1. In my code I put the target Width and Height (600px x 450px), but the image only respect the width. But the Height is proportional to the screen.

I take a picture that should be of 600px x 450px but the result image is 600px x 338px.

This is the image that is stored in Parse:

 ![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/Fcw4Ohxz8MKC-legacy-files-5gmJo7MLY6XT4fsH-MXPA5-feOCrDhLiVLuPCf5yU.jpg)

My code is:

```auto
        <App Theme="Basic" ClearColor="#eeeeeeff">
        <DockPanel>
            <StatusBarBackground DockPanel.Dock="Top" />
                  <JavaScript>
                      var Parse = require("Parse").Parse;
                    var Observable = require('FuseJS/Observable');
                    var Camera = require('FuseJS/Camera');
                    var Parse = require("Parse").Parse;
                    Parse.initialize("APP ID", "JAVASCRIPT ID"); 
                    var Post = Parse.Object.extend("fotos");

                    function MyFuction(args) {
                        Camera.takePicture({ targetWidth:600, targetHeight:450, correctOrientation:true }).then(function(file) {
                        module.exports.imageFile.value = file;
                          var newPost = new Post();
                          var parseFile = new Parse.File(file.name, file);
                          parseFile.save({success: function(){
                                      newPost.set("foto", parseFile);
                                    newPost.save();
                              }, error: function(){
                                      //
                              }
                            });
                        });
                      }

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

                  </JavaScript>
                  <JavaScript File="parse-1.5.0.min.js" ux:Global="Parse" />

                      <Panel Background="Red" Width="100%" Height="80." >
                          <Text Alignment="VerticalCenter" Value="Take Picture and Upload to Parse!" TextColor="#fff" FontSize="20" TextAlignment="Center" />
                          <Clicked Handler="{MyFuction}" /> </Panel>

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

        </DockPanel>
    </App>

```

Is it possible that these things do not happen?

---

<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:** [August 5, 2015, 4:13pm UTC](https://forums.fusetools.com/t/problem-with-taking-pictures-and-upload-to-parse/3777/2 "2015-08-05T16:13:24Z")

</div>

Hi!

Problem 1) looks like a bug in our Android rendering. Can you please provide details of what device you are using for testing + steps to reproduce ?

Problem 2) is intentional. The size you ask the camera for is just a maximum size, the camera will return whatever aspect it natively captures.

---

<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 6, 2015, 2:00pm UTC](https://forums.fusetools.com/t/problem-with-taking-pictures-and-upload-to-parse/3777/3 "2015-08-06T14:00:43Z")

</div>

Thanks!

1. I testing in a Galaxy s4 (GT-I9505) Android 5.0.1. If you reproduce the code shown above and you take a picture, the graphic error appear when the image is displayed in the app:

```auto
module.exports.imageFile.value = file;

```

1. Thanks!
