File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,19 @@ Base64
1818 O> bitmap:copy-to-pcolors image true
1919 pcolors = map [ p -> [pcolor] of p ] (sort patches) => true
2020
21+ Base64NoPrefix
22+ extensions [ bitmap ]
23+ globals [ base64 image pcolors ]
24+ O> set image bitmap:import "extensions/bitmap/test-images/BitmapTest.jpg"
25+ O> set image bitmap:scaled image 64 48
26+ O> bitmap:copy-to-pcolors image true
27+ O> set pcolors map [ p -> [pcolor] of p ] (sort patches)
28+ O> set base64 bitmap:to-base64 image
29+ substring base64 0 49 => "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEA"
30+ O> set image bitmap:from-base64 (substring base64 22 (length base64)) ; Strip the prefix
31+ O> bitmap:copy-to-pcolors image true
32+ pcolors = map [ p -> [pcolor] of p ] (sort patches) => true
33+
2134AverageColor
2235 extensions [ bitmap ]
2336 globals [ image ]
You can’t perform that action at this time.
0 commit comments