Platforms to show: All Mac Windows Linux Cross-Platform
FAQ.How to create a Mac picture clip file?
dim f As FolderItemdim p As Picturef=SpecialFolder.Desktop.Child("Test.pictClipping")if f=nil then Returnp=new Picture(300,200,32) 'Make a sample picturep.Graphics.ForeColor=RGB(0,255,255)p.Graphics.FillOval 0,0,99,99p.Graphics.ForeColor=RGB(255,0,0)p.Graphics.DrawOval 0,0,99,99dim r As ResourceFork 'ResourceFork is needed for a clip file// Please define a file type Anyr=f.CreateResourceFork("Any")// get PICT data using plugin functiondim pictdata as string = p.PicHandleDataMBSr.AddResource(pictdata,"PICT",256,"Picture")dim m as new MemoryBlock(8)m.LittleEndian = falsem.Int16Value(0) = 0m.Int16Value(2) = 0m.Int16Value(4) = p.Widthm.Int16Value(6) = p.Heightr.AddResource(m,"RECT",256,"")'Values taken from a sample file and irrelevant to the problemdim data as string = DecodeBase64("AQAAAAAAAAAAAAAAAAACAFRDRVIAAAABAAAAAAAAAABUQ0lQAAAAAQAAAAAAAAAA")r.AddResource(data,"drag",128,"") 'dittor.Close
In general Apple has deprecated this, but a few application still support clippings.