Image::releasePixelDataReadWrite (void* sourceData)


What is the sourceData parameter supposed to be doing?

I can’t work out from the docs what it does, and a quick look at juce_Image.cpp seems to suggest it doesn’t do much. :?


you have to pass a uint8* data that you previously locked with Image::lockPixelDataReadWrite…
example is:

[code]uint8* data = yourImage.lockPixelDataReadWrite( blah, blah, …

for( int i=0; i<height; i++ )
for( int j=0; j<width; j++ )
// use data pixels

yourImage.releasePixelDataReadWrite (data );[/code]

that’s all !


It doesn’t do anything at the moment, because the images are memory-based, but in future other types of image which are stored in video memory might need to use it.