Added Locking and pixel formats