Hi all,<br><br>Does anyone know how to easily go from a *.ico file (maybe Windows only) to a bitmap% or something else I can use in program?<br><br>I see the function read-icos in file/ico, and also the function ico->argb which gives a bytes? that represents an argb image, but I can't figure out how to get from a bytes? to an actual argb?.<br>
<br>Cheers,<br><br>Kieron<br><br>****<br><br>#lang racket/base<br><br>(require file/ico)<br><br>(read-icos "icons\\an-icon-file.ico")<br><br>(map <br> (lambda (x)<br> (printf "ico:(~ax~ax~a)~n" (ico-width x) (ico-height x) (ico-depth x)))<br>
(read-icos "icons\\an-icon-file.ico"))<br><br>(require mrlib/cache-image-snip)<br><br>(map (lambda (x) (argb->bitmap (ico->argb x))) (read-icos "icons\\an-icon-file.ico"))<br><br>****<br><br>Gives results:<br>
<br>'(#<ico> #<ico>)<br><br>ico:(32x32x4)<br>ico:(16x16x4)<br><br>'(#<void> #<void>)<br><br>. . argb->bitmap: contract violation<br> expected: argb?<br> given: #"\0\0\0\0\0\0\0\0\0\0\0\ ...<br>
<br><br>