]> git.sesse.net Git - casparcg/commitdiff
Fix thumbnail saving on non-windows systems
authorkrzyc <pyrkosz@o2.pl>
Mon, 11 Apr 2016 23:14:13 +0000 (01:14 +0200)
committerkrzyc <pyrkosz@o2.pl>
Mon, 11 Apr 2016 23:14:13 +0000 (01:14 +0200)
where function FreeImage_SaveU does nothing

modules/image/consumer/image_consumer.cpp

index fd4348058443dec1e7f65534a83b18cf618fd03c..ab466f046ce6e804d9ba718db0f795da577a0a2e 100644 (file)
@@ -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