From fc39cbdd9b1a9f5509b4e1447f9b286491e1cd48 Mon Sep 17 00:00:00 2001 From: pngwn Date: Mon, 6 Mar 2023 16:04:42 +0000 Subject: [PATCH] ensure image is always drawn (#3386) * ensure image is always drawn * fix demo * notebooks * clean --- CHANGELOG.md | 2 +- demo/blocks_mask/colorede.png | Bin 9281 -> 0 bytes demo/blocks_mask/run.ipynb | 2 +- ui/packages/image/src/Sketch.svelte | 6 +++++- 4 files changed, 7 insertions(+), 3 deletions(-) delete mode 100644 demo/blocks_mask/colorede.png diff --git a/CHANGELOG.md b/CHANGELOG.md index f730ddad1c..44009bd6a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ No changes to highlight. ## Bug Fixes: -No changes to highlight. +- Ensure uploaded images are always shown in the sketch tool by [@pngwn](https://github.com/pngwn) in [PR 3386](https://github.com/gradio-app/gradio/pull/3386) ## Documentation Changes: No changes to highlight. diff --git a/demo/blocks_mask/colorede.png b/demo/blocks_mask/colorede.png deleted file mode 100644 index a8e196f9a62b87ee52b8bed95e482fbd6da55bb4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9281 zcmeG>d032nyZ19QP203mlC%(^kQ$WK3@J-dUS1+J))r|IEh_WaE9Au+Dry|0muQd@ zX&y#pX=9>N6se3#(LU46bAA)w`M&Eq*L$7oyUzLJ{NbOO=eg&1-@kj`Cf;+|LJc)T zH2~09ylBC105tSS0~HGT>f#nu0hp^SUNCQE#-R_> zIP`&=Dz4f83;0VRzntM$ApCDK!_W!|1veEjcdw6lxPdES*%@i(k?;Fu`qebpNCSR> ze@e?_a?itZXEIDu$TB{0!2s}P72u3+vU@KNn=E3!lU(eS3O|I{89f0gm=92q+SwzB zOeN*qHzfvk#wV5lq?rPKJE2B-wXNN> z(EwUHK%7Vj?#*vFj|r_ALQlzB;02&FSr_xk(@|F*qjWojE?Qsxy^@T-0x)m^aK8u1 zQdTn8#SoxS7qop}9O)mm#X%cl+<=|%*7##S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