From: krzyc Date: Mon, 11 Apr 2016 23:14:13 +0000 (+0200) Subject: Fix thumbnail saving on non-windows systems X-Git-Tag: 2.1.0_Beta1~85^2^2 X-Git-Url: https://git.sesse.net/?p=casparcg;a=commitdiff_plain;h=e87a1b1a9301f029fe8dbb8c0b3d523cfb7e0f54 Fix thumbnail saving on non-windows systems where function FreeImage_SaveU does nothing --- diff --git a/modules/image/consumer/image_consumer.cpp b/modules/image/consumer/image_consumer.cpp index fd4348058..ab466f046 100644 --- a/modules/image/consumer/image_consumer.cpp +++ b/modules/image/consumer/image_consumer.cpp @@ -66,7 +66,11 @@ void write_cropped_png( std::copy(thumbnail_view.begin(), thumbnail_view.end(), destination_view.begin()); FreeImage_FlipVertical(bitmap.get()); +#ifdef WIN32 FreeImage_SaveU(FIF_PNG, bitmap.get(), output_file.wstring().c_str(), 0); +#else + FreeImage_Save(FIF_PNG, bitmap.get(), u8(output_file.wstring()).c_str(), 0); +#endif } struct image_consumer : public core::frame_consumer