Example #1
0
bool
DPXOutput::close ()
{
    if (m_stream) {
        m_dpx.WriteElement (0, &m_buf[0], m_datasize);
        m_dpx.Finish ();
    }
        
    init();  // Reset to initial state
    return true;  // How can we fail?
                  // Epicly. -- IneQuation
}
Example #2
0
bool
DPXOutput::close ()
{
    bool ok = true;
    if (m_stream) {
        ok &= write_buffer ();
        m_dpx.Finish ();
    }
        
    init();  // Reset to initial state
    return ok;
}
Example #3
0
bool
DPXOutput::close ()
{
    if (! m_stream) {   // already closed
        init ();
        return true;
    }

    bool ok = true;
    if (m_spec.tile_width) {
        // Handle tile emulation -- output the buffered pixels
        ASSERT (m_tilebuffer.size());
        ok &= write_scanlines (m_spec.y, m_spec.y+m_spec.height, 0,
                               m_spec.format, &m_tilebuffer[0]);
        std::vector<unsigned char>().swap (m_tilebuffer);
    }

    ok &= write_buffer ();
    m_dpx.Finish ();
    init();  // Reset to initial state
    return ok;
}