From fce836bb4590b75f148d26d7e4c80b7ff22049a0 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Thu, 9 Jun 2022 18:12:24 -0500 Subject: [PATCH 1/4] use ptr+len png decode --- src/windy/platforms/macos/platform.nim | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/windy/platforms/macos/platform.nim b/src/windy/platforms/macos/platform.nim index f9aa533..a099876 100644 --- a/src/windy/platforms/macos/platform.nim +++ b/src/windy/platforms/macos/platform.nim @@ -959,13 +959,8 @@ proc getClipboardImage*(): Image = if pngData.int == 0: return - # Pixie needs a decodePng for ptr + len, copy into string for now - - var copiedData = newString(pngData.length) - copyMem(copiedData[0].addr, pngData.bytes, pngData.length) - try: - result = newImage(decodePng(copiedData)) + result = newImage(decodePng(pngData.bytes, pngData.length.int)) except: return From 47b08ec405504494043039b4cadc48e0c7d46b42 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Sun, 12 Jun 2022 11:23:59 -0500 Subject: [PATCH 2/4] use convertToImage --- src/windy/platforms/macos/platform.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/windy/platforms/macos/platform.nim b/src/windy/platforms/macos/platform.nim index a099876..04ea980 100644 --- a/src/windy/platforms/macos/platform.nim +++ b/src/windy/platforms/macos/platform.nim @@ -960,7 +960,7 @@ proc getClipboardImage*(): Image = return try: - result = newImage(decodePng(pngData.bytes, pngData.length.int)) + result = decodePng(pngData.bytes, pngData.length.int).convertToImage() except: return From 473b5b1dd31b6685b5775d0b2f436ff707c3d043 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Sun, 12 Jun 2022 11:39:23 -0500 Subject: [PATCH 3/4] get zippy from pixie --- windy.nimble | 1 - 1 file changed, 1 deletion(-) diff --git a/windy.nimble b/windy.nimble index 5670def..ba89acc 100644 --- a/windy.nimble +++ b/windy.nimble @@ -9,5 +9,4 @@ requires "nim >= 1.4.8" requires "opengl >= 1.2.6" requires "pixie >= 4.3.0" requires "urlly >= 1.0.0" -requires "zippy >= 0.10.2" requires "ws >= 0.5.0" From aa8016b988d8abbe83dec18c6f93f330670503e2 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Tue, 21 Jun 2022 14:43:47 -0500 Subject: [PATCH 4/4] pixie 4.4.0 --- windy.nimble | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windy.nimble b/windy.nimble index ba89acc..f0f8489 100644 --- a/windy.nimble +++ b/windy.nimble @@ -7,6 +7,6 @@ srcDir = "src" requires "nim >= 1.4.8" requires "opengl >= 1.2.6" -requires "pixie >= 4.3.0" +requires "pixie >= 4.4.0" requires "urlly >= 1.0.0" requires "ws >= 0.5.0"