|
CreateFxImageEx | |
CreateFxImageEx ImageIndex, Width, Height, Depth | |
Parameters: ImageIndex = The Index of the image that you wish to create. Width = The width of the image in pixels Height = The Height of the image in pixels Depth = The Colour Depth of this image |
|
Returns: NONE | |
CreateFxImageEx is unique in terms of PB graphic commands. CreateFxImageEx is the only command that lets you not only specify the size (width & height) of the image, but you can also select the colour depth of this image. This is unique as the PlayBASIC graphics engine was designed to automatically scale image colour depths to match of the PB screens colour depth. Meaning that if you open a 16bit screen, then images will also be stored in this format. This is done to ensure the most efficient path when transferring image data to the screen However, I can see a point where it might be useful for a programmer to open an image that is of a specific colour format, regardless of the current screen modes. While you can draw to these images using the normal vector graphics commands (dot, line, box etc etc) you'll only be able to draw images to them that have the same colour depth. Depth values and colour formats 15Bit = RGB Colour format 555 (each pixel is a word (2 bytes)) 16Bit = RGB Colour format 565 (each pixel is a word (2 bytes)) 24Bit = RGB Colour format 888 (each pixel is 3 bytes) 32Bit = RGB Colour format -888 (each pixel is a Long/Integer (4 bytes)) FACTS: * While CreateFxImageEx allows you to create an Image that is of a different depth than the display. The drawing commands like DrawImage can actually translate pixel formats when drawing mismatched image buffers while drawing. Please be aware that depending upon the pixel format, the operation may change the colours of the drawn image. DrawImage Format Conversion conversion table
|
|
Example Source: Download This Example
|
Related Info: | CreateImage | DeleteImage | DrawImage | GetFreeImage | LoadImage | NewImage | PrepareFXimage | RenderToImage : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |