Dim sourcePicture As Picture
Dim iccProfileObj As LCMS2ProfileMBS
Dim gmImageObj As GMImageMBS
iccProfileObj = LCMS2ProfileMBS.CreateSRGBProfile
sourcePicture = New Picture(100, 100, 24)
sourcePicture.Graphics.ForeColor = RGB(255, 0, 0)
sourcePicture.Graphics.FillOval(0, 0, sourcePicture.Width, sourcePicture.Height)
gmImageObj = New GMImageMBS(sourcePicture)
gmImageObj.iccColorProfile = New GMBlobMBS(iccProfileObj.SaveProfileToString)
Call gmImageObj.write(SpecialFolder.Desktop.Child("TestWithProfile.tif"))