|
NewImage | |
ImageIndex = NewImage(Width, Height, [Format =1]) | |
Parameters: Width = The width of the Image in pixels Height = The Height of the Image in pixels [Format =1] = Optional Image Format Parameter (1=Video, 2=fX, 8= AFX) |
|
Returns: ImageIndex = The Index of the newly created Image |
|
The NewImage() function creates a blank Image in memory and returns this new images index for you. When images are created, they're filled in with a black colour (Rgb(0,0,0)). Image Format Parameter: PlayBASIC has various types of Image formats, each one suited for different uses. 1 = Video - Image is created in Video Memory 2 = FX - System Memory Image 8 = AFX - System Memory Image With Alpha Channel To learn more about images we recommend you read the CreateImage as well as the Images and Sprites tutorials FACTS: * Video + FX Images created via NewImage are depth compatibile with the current screen display mode. So if the program is running on a 16bit screen mode, then the Image will also be 16bit. You can manually create FX images of any depth using CreateFxIMageEx, but not Video images. AFX formatted images are 32bit regardless. * NewImage does not change PlayBASIC current graphics output. So if you want to redirect all drawing operations to a newly created Image, you'll have to do this manually via RenderToImage. Mini Tutorial: This example creates a new Image in memory, renders some graphics to it, then it draws this Image to the screen.
|
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |