I want to "slice" an image, e.g. a Font Image with fixed size and ordered characters. For example:
A B C D E F G H I J K L ... etc. Each Letter 32x32 pixels
Coordinates
A = 0,0,31,31
B = 32,0,63,31
.. Etc.
How do I do that with PureBasic?
I don't care too much about the image format. Anything for PNG, JPG, BMP or even RAW binary data would work for me. But I need to be able to use the slice for displaying in my PB app.
Thanks.
Slicing an Image
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: Slicing an Image
You'd use GrabImage() for that. Look it up in the doc, give it a try and if you have trouble, let us know.
BERESHEIT
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
Re: Slicing an Image
if you want to display on a screen, you'll load the Image as a Sprite and use ClipSprite.
oh... and have a nice day.
Re: Slicing an Image
Thanks a lot, both your options do the trick 
