diff --git a/src/image/image.cpp b/src/image/image.cpp index 0a97e91b..6350dc9e 100644 --- a/src/image/image.cpp +++ b/src/image/image.cpp @@ -199,6 +199,8 @@ template typename PixelType::type *Image::Lock() /* The Lock2D() method */ void *Image::Lock2DHelper(PixelFormat T) { + SetFormat(T); + return m_data->m_pixels[(int)T]->Data2D(); }