Ah nice catch, this is due to mIRC adjusting window sizes to make them fit in the MDI area when a window is created. To get around this, you need to use /window twice....
Updated:
alias test {
window -hpf @Test -1 -1 32 32
echo -s * Debug: first window call- DW: $window(@Test).dw DH: $window(@Test).dh
window -hpf @Test -1 -1 32 32
echo -s * Debug: second window call- DW: $window(@Test).dw DH: $window(@Test).dh
drawpic -g0 @Test 0 0 $qt($mircexe)
drawsave @Test tmp.png
close -@ @Test
bread tmp.png 0 $file(tmp.png).size &bimgfile
.remove tmp.png
noop $encode(&bimgfile,bm)
clipboard data:image/png;base64, $+ $bvar(&bimgfile,1-).text
echo -s Data URL copied to clipboard!
}
Output:
* Debug: first window call- DW: 120 DH: 32
* Debug: second window call- DW: 32 DH: 32
Data URL copied to clipboard!
You should be able to paste your clipboard into your browsers url bar, hit enter, and now see the icon as 32x32