Function Image.lock

Locks the data for reading and writing access. Sends an error to the console if the image is not locked when reading or writing a pixel.

void lock() nothrow @nogc;