BlitzCoder Essentials
•
Home Page
•
About BlitzCoder
•
Contributors
•
Terms of Use
•
Email Us
Main Areas
•
BlitzCoder Chat
•
Discussions
•
Articles/Tutorials
•
Code Database
•
Link Database
•
Showcase Area
•
Worklogs
•
Competitions
Special Areas
•
Undocumented
Other Blitz Sites
•
Blitz Basic Home
•
Blitz Showcase
•
BlitzPlay Library
Forum Login
Username:
Password:
•
Register Now!
BlitzCoder Code Archives Page
Main Codes Page
"Some Image Functions"
, by cloudnine
Just in case you wanted to attach a handle to an image, instead of changing the image itself. If the image is not already loaded, it will load it
Code
;====================================================================; Function MW_ResizeImage(image$,width,height) imagetemp=CopyImage(image$) If imagetemp=0 imagetemp=LoadImage(image$) EndIf ResizeImage imagetemp,width,height Return imagetemp End Function ;====================================================================; Function MW_RotateImage(image$,angle#) imagetemp=CopyImage(image$) If imagetemp=0 imagetemp=LoadImage(image$) EndIf RotateImage imagetemp,angle# Return imagetemp End Function ;====================================================================; Function MW_ScaleImage(image$,scalex#,scaley#) imagetemp=CopyImage(image$) If imagetemp=0 imagetemp=LoadImage(image$) EndIf ScaleImage imagetemp,scalex#,scaley# Return imagetemp End Function ;====================================================================; ;And some examples myimagehandle=MW_ResizeImage("cool.bmp",200,200) myimagehandle=MW_RotateImage("cool.bmp",172) myimagehandle=MW_ScaleImage("cool.bmp",2.0,2.0)
Copyright(c) 2000-2004, BlitzCoder. All Rights Reserved.
Code software created by Krylar's Kreations