question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[🐛] wrong height and width in android real device

See original GitHub issue

Description

This is library is perfect and growing. It is working perfectly in iOS and android simulator.

In Android real device facing following issue: Capure or pick from gallery images getting wrong height and width(reverse) when i set maxHeight and maxWidth properties.

How to repeat issue and example

In Android real device facing following issue: Capure or pick from gallery images getting wrong height and width(reverse) when i set maxHeight and maxWidth properties and portrait mode image.

launchCamera({
            includeExtra: false,
            mediaType: "photo",
            saveToPhotos: false,
            cameraType: "back",
            quality: 1,
            maxWidth: 1000,
            maxHeight: 1500
        }, this.commonCameraGalleryRespone);

response:

height: 1000
width: 750

Additional Information

  • Image Picker version: 4.6.0
  • React Native version: 0.63.4
  • Platform: Android (real device)
  • Development Operating System: MacOS Big Sur

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

1reaction
alariejcommented, Nov 14, 2022

Same issue on Android (test device is a Samsung Galaxy S7). Portrait photos picked from the Gallery have the width and height mixed up. Landscape photos are OK. No problem on iOS.

0reactions
ArkanRomanPangocommented, Oct 19, 2022

response when you try to take photo from real android device. I got width and height from asset. Made photo with horizontal and vertical orientation but got the same response image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wrong display width and height in Android - Stack Overflow
Show activity on this post. I have a screen size of 600 (width) x 1024 (height). I get current width 600 but incorrectly...
Read more >
Android 2.2 browser gives incorrect screen.width and height ...
Hi, I am using JavaScript window object to detect the screen width and height. The Android 2.2 browser does not give the right...
Read more >
TextView - Android Developers
Bit shift of MEASURED_STATE_MASK to get to the height bits for functions that combine both width and height into a single int, such...
Read more >
How to Get Screen Width and Height in Android?
So that users with different device size configurations can use the application. Many applications need to get the height and width of the ......
Read more >
Android DPI and screen width/height still wrong - cocos2d-x
float dpi = (float)(Device::getDPI());. reports 360, when it should be 480. The situation is somewhat better on iOS. iPad3 and iPhone5s give ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found