Documentation Project 1
sack::image::RemakeImageEx Function
__cdecl IMAGE_PROC Image RemakeImageEx(Image pImage, PCOLOR pc, _32 width, _32 height DBG_PASS);
#define RemakeImage(p,pc,w,h) RemakeImageEx(p,pc,w,h DBG_SRC)
#define ResizeImage( p,w,h) ResizeImageEx( p,w,h DBG_SRC )
_32 width 
the width of the data in pixels. 
Pointer to a buffer of 32 bit color data. ARGB and ABGR available via compile option. 
the height of the data in pixels. 

Returns the original image if not NULL, otherwise results with an image who's color plane is defined by a user defined buffer of width by height size. The user must have allocated this buffer appropriately, and is responsible for its destruction.

Create or recreate an image using the specified color buffer, and size. All sub-images have their color data reference updated.

If the source image is NULL, a new image will be built using the color buffer and size specified. 

Image.flags has IF_FLAG_EXTERN_COLORS set if made this way, since the color buffer is an external resource. This causes UnmakeImage() to not attempt to free the color buffer. 

If the original image does exist, its color buffer is swapped for the one specified, and coordinates are updated. The video system uses this to create an image that has the color data surface the surface of the display.



Image image = NULL;
POINTER data = NewArray( CDATA, 100* 100 );
image = RemakeImage( image, data, 100, 100 );
Copyright (c) 2010. All rights reserved.
What do you think about this topic? Send feedback!