# Capture Image always show sideways

**URL:** <https://forum.inductiveautomation.com/t/capture-image-always-show-sideways/67239>\
**Category:** Ignition\
**Tags:** ignition81, database, perspective\
**Created:** [December 5, 2022, 4:32pm UTC](https://forum.inductiveautomation.com/t/capture-image-always-show-sideways/67239 "2022-12-05T16:32:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JR7](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@JR7](https://forum.inductiveautomation.com/u/JR7)\
**Post date:** [December 5, 2022, 4:32pm UTC](https://forum.inductiveautomation.com/t/capture-image-always-show-sideways/67239/1 "2022-12-05T16:32:50Z")

</div>

Hi All,

I'm using perspective app to upload an image to my database but when I captured an image from my phones camera it always turn sideways even if my phone orientation is locked to Portrait mode.

I used report to query the latest uploaded image.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/2/c2544b7be20bb47eaa7b6be72e36a0cd9e1999dc.png)

Below is the component of imageViewer report.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/0/507cea22b6fb7cdc843b0b78ebbc308f057d8886.png)

Below is in preview mode.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/0/00bcd1e58df990ecd4ff6fb43952af6ad156b186.png)

Thank you in advance who will share their thoughts. 🙂

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 5, 2022, 6:34pm UTC](https://forum.inductiveautomation.com/t/capture-image-always-show-sideways/67239/2 "2022-12-05T18:34:52Z")

</div>

If it's always consistently rotated, you could just set the 'Roll' property on the image component?

---

<div class="post-metadata">

**Author:** ![JR7](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@JR7](https://forum.inductiveautomation.com/u/JR7)\
**Post date:** [December 5, 2022, 6:43pm UTC](https://forum.inductiveautomation.com/t/capture-image-always-show-sideways/67239/3 "2022-12-05T18:43:18Z")

</div>

Thanks PGriffith, The problem is if I upload a file or a jpeg (portrait orientation) it will also rotate.

BTW this is the script on my button.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/e/4e75fce5413906c4f1cee91249743d460dcf4dc2.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 5, 2022, 6:46pm UTC](https://forum.inductiveautomation.com/t/capture-image-always-show-sideways/67239/4 "2022-12-05T18:46:32Z")

</div>

I don't think there's anything wrong with your script or Ignition here. Your phone just happens to be giving you back rotated images. You don't really have any control over that.  
You could maybe have an option somewhere on the view where you're uploading the file to preview it, see if the orientation is correct, then rotate it (somewhat involved code) and store the 'corrected' image to the DB.

---

<div class="post-metadata">

**Author:** ![JR7](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@JR7](https://forum.inductiveautomation.com/u/JR7)\
**Post date:** [December 5, 2022, 8:36pm UTC](https://forum.inductiveautomation.com/t/capture-image-always-show-sideways/67239/5 "2022-12-05T20:36:22Z")

</div>

I viewed the data (blob) in MySQL and it shows sideways but when I saved it to my computer it shows original orientation.  
I will check the other options.  
Thanks for your input Sir PGriffith
