Let rawler decode a linear DNG wider than 16 700 pixels
rawler's allocation guard is sized in samples but worded in pixels, and a linear DNG passes width × 3. A 22927 × 8966 Lightroom panorama was refused as ">50000 px wide", and develop fell back silently to the embedded preview. Route rawler through third_party with the guard at 1.5 G samples and 200 000 per axis.
This commit is contained in:
+8
-4
@@ -531,8 +531,10 @@ unsafe impl<T, const N: usize> Sync for Color2DPtr<T, N> {}
|
||||
#[macro_export]
|
||||
macro_rules! alloc_image_f32_plain {
|
||||
($width:expr, $height:expr, $dummy: expr) => {{
|
||||
if $width * $height > 500000000 || $width > 50000 || $height > 50000 {
|
||||
panic!("rawler: surely there's no such thing as a >500MP or >50000 px wide/tall image!");
|
||||
// DarkRoom: the limit is in *samples*, and a linear DNG passes
|
||||
// width × 3. Upstream's 50000 refused a 22927-pixel-wide panorama.
|
||||
if $width * $height > 1_500_000_000 || $width > 200_000 || $height > 200_000 {
|
||||
panic!("rawler: surely there's no such thing as a >1500M-sample or >200000-sample wide/tall image!");
|
||||
}
|
||||
if $dummy {
|
||||
$crate::pixarray::PixF32::new_uninit($width, $height)
|
||||
@@ -545,8 +547,10 @@ macro_rules! alloc_image_f32_plain {
|
||||
#[macro_export]
|
||||
macro_rules! alloc_image_plain {
|
||||
($width:expr, $height:expr, $dummy: expr) => {{
|
||||
if $width * $height > 500000000 || $width > 50000 || $height > 50000 {
|
||||
panic!("rawler: surely there's no such thing as a >500MP or >50000 px wide/tall image!");
|
||||
// DarkRoom: the limit is in *samples*, and a linear DNG passes
|
||||
// width × 3. Upstream's 50000 refused a 22927-pixel-wide panorama.
|
||||
if $width * $height > 1_500_000_000 || $width > 200_000 || $height > 200_000 {
|
||||
panic!("rawler: surely there's no such thing as a >1500M-sample or >200000-sample wide/tall image!");
|
||||
}
|
||||
if $dummy {
|
||||
$crate::pixarray::PixU16::new_uninit($width, $height)
|
||||
|
||||
Reference in New Issue
Block a user