mitchtabian / TabianCustomCamera

Custom camera for android using camera2 api (DEPRECATED)
152 stars 66 forks source link

Preview Front and Back Camera is too dark #15

Closed harismiftahulhudha closed 5 years ago

harismiftahulhudha commented 5 years ago

My camera preview is too dark

take a look at this screenshot

Original Camera Application

Back Camera Front Camera

Custom Camera Application

Back Camera Front Camera

Phone test results:

05-11 07:44:19.319 13643-13652/? I/art: Background sticky concurrent mark sweep GC freed 226547(11MB) AllocSpace objects, 4(72KB) LOS objects, 28% free, 29MB/41MB, paused 5.871ms total 143.860ms 05-11 07:47:05.447 1619-1628/? I/art: Background sticky concurrent mark sweep GC freed 266357(13MB) AllocSpace objects, 40(800KB) LOS objects, 25% free, 42MB/56MB, paused 3.849ms total 123.400ms 05-11 07:47:07.017 1619-1644/? I/art: Explicit concurrent mark sweep GC freed 168985(9MB) AllocSpace objects, 54(1164KB) LOS objects, 28% free, 40MB/56MB, paused 3.144ms total 218.693ms 05-11 07:47:10.504 13672-13682/? I/art: Background sticky concurrent mark sweep GC freed 69382(5MB) AllocSpace objects, 17(856KB) LOS objects, 19% free, 28MB/35MB, paused 2.368ms total 230.571ms 05-11 07:47:10.712 13672-18526/? I/Icing: Usage reports ok 0, Failed Usage reports 0, indexed 0, rejected 0, imm upload false

 OS Version: 3.18.19(19043161495bb)
 OS API Level: 23
 Device: mk6p
 Model (and Product): LG-K220 (mk6p_global_com)

 Display Width: 720
 Display Height: 1193
 Aspect Ratio: 1.6569444

05-11 07:48:12.466 1619-1628/? I/art: Background sticky concurrent mark sweep GC freed 241645(14MB) AllocSpace objects, 12(240KB) LOS objects, 27% free, 40MB/56MB, paused 3.980ms total 145.287ms

mitchtabian commented 5 years ago

I didn't go over anything in the course for adjusting the colors of the preview. You'll have to do some googling to figure out how to adjust the brightness. This looks promising: https://stackoverflow.com/questions/42806855/android-camera2-api-set-custom-brightness-contrast-gamma