jackpine / biketag-ios

http://biketag.jackpine.me
1 stars 1 forks source link

captured image looks way darker than photopreview #2

Closed michaelkirk closed 9 years ago

michaelkirk commented 9 years ago

Given I'm taking a photo When the photo preview looks good WRT to color/light levels img_1359 And when I capture the image Then I see the UIImage of the Image I just captured But it's super dark img_1360

Why doesn't it look the same?

jmoody commented 9 years ago

Can you point me to the code that is storing and retrieving this image?

Yeah, I am lazy.

michaelkirk commented 9 years ago

Thanks for looking Joshua -

Photo is turned into a UIImage here https://github.com/michaelkirk/biketag/blob/master/src/BikeTag/Controllers/SubmitGuessViewController.swift

Most of the capture happens in the parent class at: https://github.com/michaelkirk/biketag/blob/master/src/BikeTag/Controllers/CameraViewController.swift

michaelkirk commented 9 years ago

Note that this doesn't happen every time - but maybe 70% of the time. I initially thought it might be just be a bug with the view - e.g. maybe I had the opacity of the view set wrong (@#$%^ interface builder!) but have verified that when presenting a UIImage from the bundle instead of one captured from the camera, I don't have this problem.

michaelkirk commented 9 years ago

Still no idea what's going on here. I'd love it if someone could test this on another device, just to make sure I'm not totally crazy.

Are either of you willing to try to reproduce this @jmoody or @svevang ?

Steps to reproduce are in the description. It fails 80% of the time for me.

I'm doing some refactoring related to this bug in feature/dark-photo, but really it doesn't seem to have affected any behavior.

michaelkirk commented 9 years ago

Note if you do want to try to duplicate this, it's probably easiest to do an ad-hoc build, which should point to the staging API by default, rather than setting up your own development API - though that could be fun too if you want to get into my docker scripts ;)

michaelkirk commented 9 years ago

Thanks to @svevang for the fix!