RAW: Index CR3 metadata and use custom RawTherapee profile #445
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
a6a4899ccc
commit
757cfc4bfb
3 changed files with 79 additions and 1 deletions
45
assets/profiles/raw.pp3
Normal file
45
assets/profiles/raw.pp3
Normal file
|
@ -0,0 +1,45 @@
|
|||
[Exposure]
|
||||
Auto=false
|
||||
HistogramMatching=true
|
||||
|
||||
[HLRecovery]
|
||||
Enabled=true
|
||||
Method=Blend
|
||||
|
||||
[Directional Pyramid Denoising]
|
||||
Enabled=true
|
||||
Enhance=false
|
||||
Median=false
|
||||
Luma=0
|
||||
Ldetail=0
|
||||
Chroma=0
|
||||
Method=Lab
|
||||
LMethod=SLI
|
||||
CMethod=AUT
|
||||
C2Method=AUTO
|
||||
SMethod=shal
|
||||
MedMethod=55
|
||||
RGBMethod=soft
|
||||
MethodMed=Lpab
|
||||
Redchro=0
|
||||
Bluechro=0
|
||||
Gamma=1.7
|
||||
Passes=1
|
||||
LCurve=0;
|
||||
CCCurve=0;
|
||||
|
||||
[LensProfile]
|
||||
LcMode=lfauto
|
||||
UseDistortion=true
|
||||
UseVignette=true
|
||||
UseCA=false
|
||||
|
||||
[Color Management]
|
||||
ToneCurve=false
|
||||
ApplyLookTable=true
|
||||
ApplyBaselineExposureOffset=true
|
||||
ApplyHueSatMap=true
|
||||
DCPIlluminant=0
|
||||
|
||||
[RAW]
|
||||
CA=true
|
|
@ -191,8 +191,9 @@ func (c *Convert) JpegConvertCommand(mf *MediaFile, jpegName string, xmpName str
|
|||
result = exec.Command(c.conf.DarktableBin(), args...)
|
||||
} else if c.conf.RawtherapeeBin() != "" {
|
||||
jpegQuality := fmt.Sprintf("-j%d", c.conf.JpegQuality())
|
||||
profile := filepath.Join(conf.AssetsPath(), "profiles", "raw.pp3")
|
||||
|
||||
args := []string{"-o", jpegName, "-d", jpegQuality, "-js3", "-b8", "-c", mf.FileName()}
|
||||
args := []string{"-o", jpegName, "-p", profile, "-d", jpegQuality, "-js3", "-b8", "-c", mf.FileName()}
|
||||
|
||||
result = exec.Command(c.conf.RawtherapeeBin(), args...)
|
||||
} else {
|
||||
|
|
|
@ -330,6 +330,34 @@ func (ind *Index) MediaFile(m *MediaFile, o IndexOptions, originalName string) (
|
|||
if res := m.Megapixels(); res > photo.PhotoResolution {
|
||||
photo.PhotoResolution = res
|
||||
}
|
||||
|
||||
if photo.CameraSrc == entity.SrcAuto {
|
||||
// Set UpdateCamera, Lens, Focal Length and F Number.
|
||||
photo.Camera = entity.FirstOrCreateCamera(entity.NewCamera(m.CameraModel(), m.CameraMake()))
|
||||
|
||||
if photo.Camera != nil {
|
||||
photo.CameraID = photo.Camera.ID
|
||||
} else {
|
||||
photo.CameraID = entity.UnknownCamera.ID
|
||||
}
|
||||
|
||||
if photo.CameraID != entity.UnknownCamera.ID {
|
||||
photo.CameraSrc = entity.SrcMeta
|
||||
}
|
||||
|
||||
photo.Lens = entity.FirstOrCreateLens(entity.NewLens(m.LensModel(), m.LensMake()))
|
||||
|
||||
if photo.Lens != nil {
|
||||
photo.LensID = photo.Lens.ID
|
||||
} else {
|
||||
photo.LensID = entity.UnknownLens.ID
|
||||
}
|
||||
|
||||
photo.PhotoFocalLength = m.FocalLength()
|
||||
photo.PhotoFNumber = m.FNumber()
|
||||
photo.PhotoIso = m.Iso()
|
||||
photo.PhotoExposure = m.Exposure()
|
||||
}
|
||||
}
|
||||
|
||||
if photo.TypeSrc == entity.SrcAuto {
|
||||
|
@ -490,6 +518,10 @@ func (ind *Index) MediaFile(m *MediaFile, o IndexOptions, originalName string) (
|
|||
photo.CameraID = entity.UnknownCamera.ID
|
||||
}
|
||||
|
||||
if photo.CameraID != entity.UnknownCamera.ID {
|
||||
photo.CameraSrc = entity.SrcMeta
|
||||
}
|
||||
|
||||
photo.Lens = entity.FirstOrCreateLens(entity.NewLens(m.LensModel(), m.LensMake()))
|
||||
|
||||
if photo.Lens != nil {
|
||||
|
|
Loading…
Reference in a new issue