Resize sprites
-
robert1352
- User

- Posts: 34
- Joined: Tue Mar 14, 2006 8:17 pm
Resize sprites
Hi everyone,does anyone know of a way to resize your sprites?? Is there a command for that? If there is I cant seem to find it. Thanks for your help. 
- netmaestro
- PureBasic Bullfrog

- Posts: 8452
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
- netmaestro
- PureBasic Bullfrog

- Posts: 8452
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
- netmaestro
- PureBasic Bullfrog

- Posts: 8452
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
-
robert1352
- User

- Posts: 34
- Joined: Tue Mar 14, 2006 8:17 pm
Resize sprite
The reason I need to resize my sprite is that for the game Im making the sprites I have avalible to me seem too large, I would like to make them a little smaller.Thank you for your help!! [/quote]
- netmaestro
- PureBasic Bullfrog

- Posts: 8452
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
In that case I suggest you:
Code: Select all
InitSprite()
OpenScreen(...)
CatchImage(#image, ?Sprite1)
ResizeImage(#image, newsize, newsize, #PB_Image_Smooth)
CreateSprite(#sprite, newsize, newsize)
StartDrawing(SpriteOutput(#sprite))
DrawImage(ImageID(#image), 0, 0)
StopDrawing()
;...program stuff
DataSection
Sprite1: IncludeBinary "<path to the sprite image>"
EndDataSectionBERESHEIT
-
robert1352
- User

- Posts: 34
- Joined: Tue Mar 14, 2006 8:17 pm
Thank you
Thank you very much Ill give your idea a try and let you know how it works out 
Re: Resize sprite
[/quote]Then you should resize them before you load them.robert1352 wrote:The reason I need to resize my sprite is that for the game Im making the sprites I have avalible to me seem too large, I would like to make them a little smaller.Thank you for your help!!
-
robert1352
- User

- Posts: 34
- Joined: Tue Mar 14, 2006 8:17 pm
thank you
Thanks everyone for all of your help 

