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.

Setting pictureSize on the Camera doesn't really affect the size of the image taken

See original GitHub issue

Environment

Expo CLI 2.3.8 environment info:
    System:
      OS: macOS 10.14
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.9.4 - ~/.nvm/versions/node/v8.9.4/bin/node
      npm: 5.6.0 - ~/.nvm/versions/node/v8.9.4/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 2.2 AI-145.3537739
      Xcode: 9.2/9C40b - /usr/bin/xcodebuild
    npmPackages:
      expo: ^30.0.1 => 30.0.1
      react: 16.3.1 => 16.3.1
      react-native: https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz => 0.55.4
      react-navigation: ^2.18.0 => 2.18.0
    npmGlobalPackages:
      expo-cli: 2.3.8

  Diagnostics report:
    https://exp-xde-diagnostics.s3.amazonaws.com/bberak-d7a0d137-25a7-43ea-9878-51ff2b1ff551.tar.gz

iOS - using iPhone SE with iOS 12.1

Steps to Reproduce

  1. Run the following snack on a physical device: https://snack.expo.io/@bberak/photo-size-bug .The snack is a copy + paste of the camerja example - with a simple alert for printing the size of the take photo.
  2. Open the photo size menu (... on the bottom left).
  3. Select various photo size and take a snap.
  4. After each snap, you will see an alert box that prints the widht and height of the photo.

Expected Behavior

I expect the size output from the alert box to correlate somewhat with the selected photo size in the menu. Eg, taking a ‘1280x720’ shot would result in a photo that is 720 in width and 1280 in height (in portrait mode).

Actual Behavior

The size of the photo is always 2304 x 4090 (approx) in portrait mode - regardless of the selected photo size in the menu. If you take the photo in landscape mode, the photo is always 4090 x 2304 (approx).

Reproducible Demo

https://snack.expo.io/@bberak/photo-size-bug

Huge Thanks

Huge thanks for creating a great platform - and let me know if I can provide any more info.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:19 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
sjchmielacommented, Dec 4, 2018

Hey, @bberak! Thank you for submitting this issue! I’ve just reproduced the problem, you’re absolutely right. Sorry for the inconvenience!

Until we get to fixing this bug you could use ImageManipulator to resize the image to requested size. 🙂

5reactions
jonasbcommented, Dec 17, 2019

Can reproduce on Android and iOS with expo 36. (Only tested in portrait)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Digital Cameras - Setting the Image Size - PictureCorrect
The image size setting on your camera will significantly affect the size of the resultant image file.
Read more >
Image Size and Resolution Explained for Print and Onscreen
This information tells you nothing about the actual pixel dimensions of the image – it only tells you the total number of pixels...
Read more >
The Truth About Image Resolution, File Size and the Web
Learn why changing the resolution of an image has no effect on its file size, and why there's no need to lower the...
Read more >
Photo Resolution Tips - Shutterfly Customer Service
Setting the camera to larger than 10 megapixels isn't necessary. ... Zoomed out photos may meet the recommended resolution size, ...
Read more >
Understand Camera Resolution and Megapixels (Easy Guide)
With the Sony A7R IV, you can even take 240MP photos by sensor shifting. ... an image can be. But in itself, it...
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