public void jpeg_write_tables()
{
if (m_global_state != JpegState.CSTATE_START)
ERREXIT(J_MESSAGE_CODE.JERR_BAD_STATE, (int)m_global_state);
/* (Re)initialize error mgr and destination modules */
m_err.reset_error_mgr();
m_dest.init_destination();
/* Initialize the marker writer ... bit of a crock to do it here. */
m_marker = new jpeg_marker_writer(this);
/* Write them tables! */
m_marker.write_tables_only();
/* And clean up. */
m_dest.term_destination();
}