void KakaduImage::closeImage()
{
#ifdef DEBUG
  Timer timer;
  timer.start();
#endif

  // Close our codestream - need to make sure it exists or it'll crash
  if( codestream.exists() ) codestream.destroy();

  // Close our JP2 family and JPX files
  src.close();
  jpx_input.close();

#ifdef DEBUG
  logfile << "Kakadu :: closeImage() :: " << timer.getTime() << " microseconds" << endl;
#endif
}
void KakaduImage::closeImage()
{
#ifdef DEBUG
  Timer timer;
  timer.start();
#endif

   
  if( codestream.exists() ) codestream.destroy();

   
  src.close();
  jpx_input.close();

#ifdef DEBUG
  logfile << "Kakadu :: closeImage() :: " << timer.getTime() << " microseconds" << endl;
#endif
}