Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
curious_george
Posts: 7
Registered: ‎04-17-2013
My Device: z10
My Carrier: Rogers

Portrait images get rotated 90 degrees

Hi,

 

I noticed something changed recently with the Z10. The camera sample app located here

 

https://github.com/blackberry/BB10-WebWorks-Samples

 

invokes the camera app and used to show pictures taken in portrait mode (vertical camera position) in a vertial portait position. Now the pictures are rotated 90 degrees. When I view the picture on the OS it is okay, portrait vertical. 

 

Is anybody else experiencing this issue? I am on software release 10.1.0.295.

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,543
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Portrait images get rotated 90 degrees

Hi there, I've confirmed this issue on the latest OS (and that it didn't exist on previous OS versions.)

I've filed a bug report with our development teams to have this looked at. It seems to be an OS-level issue at this time.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
New Contributor
kp13
Posts: 7
Registered: ‎03-02-2012
My Device: 9900
My Carrier: AT&T

Re: Portrait images get rotated 90 degrees

I'm having the same issues with Cascades ....

Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 614
Registered: ‎10-01-2009
My Device: Z10
My Carrier: Bell

Re: Portrait images get rotated 90 degrees

You guys may want to take a look at my EXIF sample. It'll show you how to read an image's meta-data to determine with way the image is stored on the device, and how to rotate it to your desired orientation.

 

EXIF Data Reader: https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/EXIF-Data-Reader

 

Also, you can simply set "imageCrop: true" when you invoke the camera. That will popup the native photo editor where the user can crop, and rotate the image as they choose. For some apps this is great, but really depends on what you're doing with the photo in your app.

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
New Contributor
curious_george
Posts: 7
Registered: ‎04-17-2013
My Device: z10
My Carrier: Rogers

Re: Portrait images get rotated 90 degrees

Hi Chad,

 

I wasn't able to call imageCrop:true when invoking the Camera. It works when I invoke the FilePicker but not the Camera. Are you able to get this working with the Camera? If so can you please provide a code sample?

Please use plain text.
New Contributor
curious_george
Posts: 7
Registered: ‎04-17-2013
My Device: z10
My Carrier: Rogers

Re: Portrait images get rotated 90 degrees

The imageCrop:true option is currently not available with the Camera card. A feature request has been filed for this.

 

https://github.com/blackberry/BB10-WebWorks-Framework/issues/657

Please use plain text.
New Contributor
LizMyers
Posts: 7
Registered: ‎02-19-2013
My Device: Z10
My Carrier: O2

Re: Portrait images get rotated 90 degrees

+1 - Am having same issue. Suggestion: When camera orientation = Portrait, Capture saves image with correct rotation. that way we wouldn't have to implement extra code to display img the way user intended. Given most photos on Q10 will likely be taken in Portrait - this is also a strong argument for not rotating on save.

Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: Portrait images get rotated 90 degrees

Obvious comment

 

Take the image with the camera then display / manipulate it in WebWorks

 

For example you could shove it on a Canvas then use the powerful features of Canvas to do a PhotoShop-esque app with ease

 

CSS3's tranforms make this even easier

 

We've got a superb Camera app - make it do something new :smileyhappy:




Click the like button if you find my posts useful!
Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 614
Registered: ‎10-01-2009
My Device: Z10
My Carrier: Bell

Re: Portrait images get rotated 90 degrees

So that's right, the imageCrop is only available via the FilePicker.  Second option would be to do as suggested, use the EXIF sample, detect which way the image  is stored, and rotate accordingly.  If you need to save a physical copy of said image, you'll want to actually rotate it on the canvas (which the sample shows).  If you just wish to display the image inside your app then you can get away with simple rotating it via CSS.

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
Developer
denniskis
Posts: 33
Registered: ‎10-29-2013
My Device: BB10
My Carrier: TMO

Re: Portrait images get rotated 90 degrees

Hi Chad,

Can you please update the link to your EXIF app. I can't find it anymore in git. Thanks
Please use plain text.