1 px transparent border to an loaded image

BlitzMax Forums/BlitzMax Beginners Area/1 px transparent border to an loaded image

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi hub!

Sorry, I don't have time for a full example but you can:

1. create the new image by:
Fullpixmap:TPixmap=CreatePixmap(32,32,PF_BGR888)

2. Load a tmp image and resize/paste it on the new one.
tmppixmap=LoadPixmapJPeg("320x320.jpg")
fullpixmap.paste(ResizePixmap(tmppixmap,32,32),0,0)

3. Write the borders via Writpixel in a loop.
WritePixel( fullpixmap:TPixmap,x,y,$000000 ) <- Black here.

4. Use MaskPixmap:TPixmap or save the image at the end.

Hope that helps a bit.

Grisu