Give a better error when guess_crop can't cope with a pixel format.
authorCarl Hetherington <cth@carlh.net>
Fri, 13 May 2022 11:39:52 +0000 (13:39 +0200)
committerCarl Hetherington <cth@carlh.net>
Fri, 13 May 2022 11:39:52 +0000 (13:39 +0200)
src/lib/guess_crop.cc

index 5deb0e480bc1f7520a8812658a6eca9fa1761168..7ee7a72860c4051bf632841a8b92f4e72f1d89a6 100644 (file)
@@ -62,7 +62,7 @@ guess_crop (shared_ptr<const Image> image, double threshold)
                        break;
                }
                default:
-                       DCPOMATIC_ASSERT (false);
+                       throw PixelFormatError("guess_crop()", image->pixel_format());
                }
 
                return brightest > threshold;