Skip to content

Commit f6abb93

Browse files
committed
Fix nw.Clipboard.get() with PNG format nwjs#6366
1 parent 732f2d7 commit f6abb93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api/nw_clipboard_api.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ namespace {
9898
}
9999

100100
if (data.type == TYPE_PNG &&
101-
!gfx::PNGCodec::EncodeA8SkBitmap(bitmap, &encoded_image)) {
101+
!gfx::PNGCodec::EncodeBGRASkBitmap(bitmap, false, &encoded_image)) {
102102
LOG(INFO) << "NwClipboardGetSyncFunction::RunSync(" << nwapi::nw__clipboard::ToString(data.type) << ") failed when converting to PNG";
103103
error_ = "Failed to encode as PNG";
104104
return false;

0 commit comments

Comments
 (0)