mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-01 05:48:12 +08:00
Raw-rs: use camera white balance when available (#1941)
* add new White Balance Tag * merge raw_to_image step with demosiacing * Use white balance from camera in scale colors step * Nit --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
444929adbf
commit
82ef5c83ae
@@ -30,6 +30,7 @@ pub enum TagId {
|
||||
JpegLength = 0x202,
|
||||
SonyToneCurve = 0x7010,
|
||||
BlackLevel = 0x7310,
|
||||
WhiteBalanceRggbLevels = 0x7313,
|
||||
CfaPatternDim = 0x828d,
|
||||
CfaPattern = 0x828e,
|
||||
ColorMatrix1 = 0xc621,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use super::types::{Array, ConstArray, TagType, TypeByte, TypeIfd, TypeLong, TypeNumber, TypeSRational, TypeShort, TypeSonyToneCurve, TypeString};
|
||||
use super::types::{Array, ConstArray, TagType, TypeByte, TypeIfd, TypeLong, TypeNumber, TypeSRational, TypeSShort, TypeShort, TypeSonyToneCurve, TypeString};
|
||||
use super::{Ifd, TagId, TiffError, TiffRead};
|
||||
|
||||
use std::io::{Read, Seek};
|
||||
@@ -27,6 +27,7 @@ pub struct JpegLength;
|
||||
pub struct SonyDataOffset;
|
||||
pub struct SonyToneCurve;
|
||||
pub struct BlackLevel;
|
||||
pub struct WhiteBalanceRggbLevels;
|
||||
pub struct CfaPatternDim;
|
||||
pub struct CfaPattern;
|
||||
pub struct ColorMatrix1;
|
||||
@@ -173,11 +174,19 @@ impl SimpleTag for SonyToneCurve {
|
||||
}
|
||||
|
||||
impl SimpleTag for BlackLevel {
|
||||
const ID: TagId = TagId::BlackLevel;
|
||||
type Type = ConstArray<TypeShort, 4>;
|
||||
|
||||
const ID: TagId = TagId::BlackLevel;
|
||||
const NAME: &'static str = "Black Level";
|
||||
}
|
||||
|
||||
impl SimpleTag for WhiteBalanceRggbLevels {
|
||||
type Type = ConstArray<TypeSShort, 4>;
|
||||
|
||||
const ID: TagId = TagId::WhiteBalanceRggbLevels;
|
||||
const NAME: &'static str = "White Balance Levels (RGGB)";
|
||||
}
|
||||
|
||||
pub trait Tag {
|
||||
type Output;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user