pub struct Camera {Show 16 fields
pub make: &'static str,
pub model: &'static str,
pub mode: &'static str,
pub canonical_make: &'static str,
pub canonical_model: &'static str,
pub aliases: &'static [(&'static str, &'static str)],
pub cfa: Option<&'static str>,
pub crop: Option<[i32; 4]>,
pub black_areas_v: &'static [[u32; 2]],
pub black_areas_h: &'static [[u32; 2]],
pub sensors: &'static [SensorInfo],
pub color_matrix: &'static [i32],
pub hints: &'static [(&'static str, &'static str)],
pub no_size_match: bool,
pub orientation: Option<CameraOrientation>,
pub image_crops: &'static [ImageCrop],
}Expand description
A camera database entry.
Fields§
§make: &'static str§model: &'static str§mode: &'static str§canonical_make: &'static str§canonical_model: &'static str§aliases: &'static [(&'static str, &'static str)](model string as written by camera, canonical alias name).
cfa: Option<&'static str>§crop: Option<[i32; 4]>[x, y, width, height]; width/height <= 0 are relative to the right/bottom edge.
black_areas_v: &'static [[u32; 2]]§black_areas_h: &'static [[u32; 2]]§sensors: &'static [SensorInfo]§color_matrix: &'static [i32]XYZ(D65) → camera, scaled by 10000.
hints: &'static [(&'static str, &'static str)]§no_size_match: bool§orientation: Option<CameraOrientation>Orientation policy override and vendor-record layout.
image_crops: &'static [ImageCrop]The camera’s own image area per active-area size (measured from files).
Implementations§
Source§impl Camera
impl Camera
Sourcepub fn sensor(&self, iso: u32) -> Option<&'static SensorInfo>
pub fn sensor(&self, iso: u32) -> Option<&'static SensorInfo>
Sensor levels for an ISO value (falls back to the first/default entry).
pub fn hint(&self, key: &str) -> Option<&'static str>
Sourcepub fn resolve_crop(
&self,
width: u32,
height: u32,
) -> Option<(u32, u32, u32, u32)>
pub fn resolve_crop( &self, width: u32, height: u32, ) -> Option<(u32, u32, u32, u32)>
Crop resolved against an uncropped width x height buffer as (x, y, w, h).
Sourcepub fn image_crop(
&self,
width: u32,
height: u32,
size: Option<(u32, u32)>,
) -> Option<[u32; 4]>
pub fn image_crop( &self, width: u32, height: u32, size: Option<(u32, u32)>, ) -> Option<[u32; 4]>
The camera’s image area inside an active area of width x height, as
[x, y, w, h] relative to the active area. With size, only a rule producing an
image of that size (either orientation) matches.
Sourcepub fn canonical_model_for(&self, model: &str) -> &'static str
pub fn canonical_model_for(&self, model: &str) -> &'static str
Canonical model name for the given raw model string (alias aware).
Trait Implementations§
impl Copy for Camera
impl StructuralPartialEq for Camera
Auto Trait Implementations§
impl Forget for Camera
impl Freeze for Camera
impl Move for Camera
impl RefUnwindSafe for Camera
impl Send for Camera
impl Sync for Camera
impl Unpin for Camera
impl UnsafeUnpin for Camera
impl UnwindSafe for Camera
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more