here is a method I used to create complete card images from images containing pieces of the cards:
image = CreateImage(iDECKWIDTH,iDECKHEIGHT,1,FILTEREDIMAGE|DYNAMICIMAGE) Local dest:Int=image Local x:Int,y:Int InsertImage decks,x,y,deckNumber,dest,$FF010101 Function InsertImage(src:Int,destx:Int,desty:Int,srcFrame:Int,dest:Int,transColor:Int=$FF000000) dmap = LockImage(dest) smap = LockImage(src,srcFrame) For y=0 To ImageHeight(src)-1 For x=0 To ImageWidth(src)-1 Local color:Int = ReadPixel(smap,x,y) color=(color & ($FFFFFF:Int)) | $FF000000:Int If color<>transColor Then WritePixel(dmap,x+destx,y+desty,color) EndIf Next Next UnlockImage(src,srcFrame) UnlockImage(dest) End Function