From: Stephen Seo Date: Sat, 27 Nov 2021 04:17:35 +0000 (+0900) Subject: Add check: color-dithering usage on colored Image X-Git-Url: https://git.seodisparate.com/stephenseo/static/gitweb.css?a=commitdiff_plain;h=a2535ce6300a6190cfb2e63b088d4e8d7b699826;p=EN605.617.81.FA21_StephenSeo_DitheringProject Add check: color-dithering usage on colored Image --- diff --git a/src/image.cc b/src/image.cc index 73ae9fe..5ebffc1 100644 --- a/src/image.cc +++ b/src/image.cc @@ -883,6 +883,13 @@ std::unique_ptr Image::ToColorDitheredWithBlueNoise(Image *blue_noise) { return {}; } + if (this->IsGrayscale()) { + std::cout << "ERROR ToColorDitheredWithBlueNoise: current Image is not " + "non-grayscale" + << std::endl; + return {}; + } + auto opencl_handle = GetOpenCLHandle(); if (!opencl_handle) { std::cout