I see from
https://www.mbs-plugins.de/archive/2018-11-04/IconFamilyMBS_class_deprecated/monkeybreadsoftware_blog_xojo
that IconFamilyMBS has been deprecated.
I've been using the code to create actual icon files in the ICNS format that
includes multiple sizes like this:
Public Function ConvertToICNSData(p as Picture) as MemoryBlock
dim fam as IconFamilyMBS = NewIconFamilyMBS
// downconvert to various sizes
dim sizes() as integer = array(1024,512,256,128, 48,32,16)
for each size as integer in sizes
if p.Width >= size or p.height >= size then
system.debuglog " adding icon size " + str(size) +"x" + str(size)
dim pX as Picture = new Picture(size,size,32)
pX.graphics.drawPicture(p,0,0,pX.width,pX.height,0,0,p.width,p.height)
pX.Mask.graphics.DrawPicture(p.CopyMask,0,0,pX.width,pX.height,0,0,p.width,p.height)
call fam.SetIconImage(pX,pX.mask)
end if
next
return fam.data
End Function
Is there any way to do this now that IconFamilyMBS is gone?
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info