private bool checkRead(bool tiles)
{
if (m_mode == O_WRONLY)
{
ErrorExt(this, m_clientdata, m_name, "File not open for reading");
return false;
}
if (tiles ^ IsTiled())
{
ErrorExt(this, m_clientdata, m_name, tiles ?
"Can not read tiles from a stripped image" :
"Can not read scanlines from a tiled image");
return false;
}
return true;
}