Fixed PNG saving.

This commit is contained in:
sutr90 2016-07-28 14:07:23 +02:00
parent 2c6351bea3
commit 933ab00942

View File

@ -80,9 +80,9 @@ namespace dlib
impl::impl_save_png(file_name, row_pointers, img.nc(), impl::png_type_rgb_alpha, 8);
}
else if (pixel_traits<pixel_type>::hsi || pixel_traits<pixel_type>::rgb)
else if (pixel_traits<pixel_type>::lab || pixel_traits<pixel_type>::hsi || pixel_traits<pixel_type>::rgb)
{
// convert from HSI to RGB (Or potentially RGB pixels that aren't laid out as R G B)
// convert from Lab or HSI to RGB (Or potentially RGB pixels that aren't laid out as R G B)
array2d<rgb_pixel> temp_img;
assign_image(temp_img, img_);
for (unsigned long i = 0; i < row_pointers.size(); ++i)