b2dCopyImage

Creates deep copy of image (GPU->CPU->GPU, fully independent duplicate). Takes imageHandle (source image handle from b2dLoadImage/b2dLoadAnimImage, positive integer). Returns new image handle (positive integer for copy, 0 on failure).

2D Overlay

Parameters & Returns

Parameters

imageHandle Int

Returns

Int

Quick Summary

Creates deep copy of image (GPU->CPU->GPU, fully independent duplicate). Takes imageHandle (source image handle from b2dLoadImage/b2dLoadAnimImage, positive integer). Returns new image handle (positive integer for copy, 0 on failure).

Technical Exegesis...

Creates deep copy of image (GPU->CPU->GPU, fully independent duplicate). Takes imageHandle (source image handle from b2dLoadImage/b2dLoadAnimImage, positive integer). Returns new image handle (positive integer for copy, 0 on failure). Performs deep copy (reads GPU texture to CPU, creates new GPU texture, uploads data), fully independent (new texture resource, new SRV, separate map entry), preserves all properties (width, height, frameWidth/Height/Count, pixel data).

Example

Example.bam

Local copiedImage:Int = b2dCopyImage(sourceImage)