diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-03-05 21:53:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-05 21:53:54 +0100 |
commit | 88355b2719fe7a103e6da82c1f58361190f2e1f1 (patch) | |
tree | b9de91a7b03fc32bf467f791293368a8fa3e61b9 /editor | |
parent | d152ac291e0c24883f1b5047bd49900bc5f0d889 (diff) | |
parent | e4b20a9a515b2493c175223d604cdfb9ae8784d1 (diff) |
Merge pull request #26655 from merumelu/assetlib-video-overlay
AssetLib: convert video thumbnails to RGBA8
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index ab3936407b..a9e9607bc5 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -177,6 +177,8 @@ void EditorAssetLibraryItemDescription::set_image(int p_type, int p_index, const thumbnail = thumbnail->duplicate(); Point2 overlay_pos = Point2((thumbnail->get_width() - overlay->get_width()) / 2, (thumbnail->get_height() - overlay->get_height()) / 2); + // Overlay and thumbnail need the same format for `blend_rect` to work. + thumbnail->convert(Image::FORMAT_RGBA8); thumbnail->lock(); thumbnail->blend_rect(overlay, overlay->get_used_rect(), overlay_pos); thumbnail->unlock(); |