KillerInk / FreeDcam

FreeDcam is a CameraApp for Android >4.0(ics) wich try to enable stuff that is forgotten by the manufacturs
GNU General Public License v2.0
300 stars 44 forks source link

DNG file is not opening in Google Photos, SnapSeed or Photoshop Express #62

Closed aunqur closed 5 years ago

aunqur commented 6 years ago

Phone Model: Mi A1

FreeDcam Version: 4.1beta9

Problem Description:

I can view the dng file from FreedCam Viewer but not opening in other apps. Google Photos failed to show and do not sync with drive. SnapSeed and Adobe Photoshop Express doesnt open the dng file. Photoshop Express gives error "The original file appears to be unsupported or damaged"

But I can open this https://www.kenrockwell.com/trips/2009-10/images/L1004220.DNG dng file in SnapSeed and Photoshop Express.

KillerInk commented 5 years ago

Hi wich api are you using? cam1/2? It would be better to upload the not working dng file 📦

But i think there is something wrong with the dng profile. https://github.com/KillerInk/FreeDcam/blob/cc18996386116f8ea16586e97081c59e6bc752e1/app/src/main/res/raw/supported_devices.xml#L2396-L2400

aunqur commented 5 years ago

I am using camera1 api. My device doesn't support camera2 api. OS version is Android 8.1.0

Here is the dng file https://drive.google.com/file/d/1p45pT7R269NhpQXtLFOi31FLWDB2LVRm/view?usp=drivesdk

And here is the dng profile https://drive.google.com/file/d/1cZJADUU0Pc-Pjnx7CUfxuBgQmQmWC0In/view?usp=drivesdk

The sample bayer file https://drive.google.com/file/d/113df-_k5zoceLPtRlQpUGVJGB0BjfFH0/view?usp=drivesdk

KillerInk commented 5 years ago

the problem is caused by the whitelvl. its 0 but on my g3 the correct whitelvl gets read and written

aunqur commented 5 years ago

Will it help if i set the white level from raw to dng tool in Viewer.

But Latest version 4.1final from play store is not capturing bayer also in my latest local build. It just shows timer in shutter button and freazes.

I am using camera1 api.

KillerInk commented 5 years ago

only reason why it could fail is normaly caused by ZSL (zeroshutterlag), it must get set to off

KillerInk commented 5 years ago

in your internalStorage/DCIM/FreeDcam/config/dngprofiles.xml are the active profiles stored. with fixing up the whitelvl 1023 the file can get open in every programm. also 64 is the correct blacklvl.

aunqur commented 5 years ago

Sweet. Works like a charm. bayer files are capturing after reset the app maybe was related to ZSL.

I've configured the dngprofiles.xml with values you have provided, Now dng captures and opening.

any further suggestion on fine tuning the dngprofiles.xml. what is rawtype? it is 0 for mine. also what about rowsize?

aunqur commented 5 years ago

Following settings will cause error while dng capture

  1. Geo-Tag Location: on ( crashes )
  2. RDI: enabled ( captures dng but freezes preview very often )
  3. ZSL: on ( freezes on capture. nothing captures and timer run continues )
KillerInk commented 5 years ago

what is rawtype? it is 0 for mine

it tells the dng writer how to handel the inputdata, like on 10bit mipi the 5th byte contains bits for the other 4byte

https://github.com/KillerInk/FreeDcam/blob/2321e8b6eafd6671d502c0a01e4e1df8815ec047/app/src/main/java/freed/dng/DngProfile.java#L30-L41

https://github.com/KillerInk/FreeDcam/blob/2321e8b6eafd6671d502c0a01e4e1df8815ec047/app/src/main/jni/freedcam/DngWriter.cpp#L657-L684


also what about rowsize?

with row size the dng can get trimmed, some dngs contains extra data and the true size is greater as the calculated. with that it can get overwriten. but its nomore needed due the crop tag

Geo-Tag Location: on ( crashes ) 

have to check, do not realy use it

RDI: enabled ( captures dng but freezes preview very often )

raw dump interface is needed on some 2016/2017 devices to get manuals working with rawcapture if you have working manuals just keep it off

ZSL: on ( freezes on capture. nothing captures and timer run continues )

yes thats due the nature of zero shutter lag. i dont support a raw stream

aunqur commented 5 years ago

Thanks :)