Add check: color-dithering usage on colored Image

This commit is contained in:
Stephen Seo 2021-11-27 13:17:35 +09:00
parent 3cece9ae1d
commit a2535ce630

View file

@ -883,6 +883,13 @@ std::unique_ptr<Image> 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