void bob::io::image::TIFFFile::read(bob::io::base::array::interface& buffer, size_t index) { if (m_newfile) throw std::runtime_error("uninitialized image file cannot be read"); if (!buffer.type().is_compatible(m_type)) buffer.set(m_type); if (index != 0) throw std::runtime_error("cannot read image with index > 0 -- there is only one image in an image file"); if(!buffer.type().is_compatible(m_type)) buffer.set(m_type); im_load(m_filename, buffer); }