예제 #1
0
OutputFile::OutputFile
    (OStream &os,
     const Header &header,
     int numThreads)
:
    _data (new Data (false, numThreads))
{
    try
    {
	header.sanityCheck();
	_data->os = &os;
	initialize (header);
    }
    catch (Iex::BaseExc &e)
    {
	delete _data;

	REPLACE_EXC (e, "Cannot open image file "
			"\"" << os.fileName() << "\". " << e);
	throw;
    }
    catch (...)
    {
	delete _data;
        throw;
    }
}
예제 #2
0
TiledRgbaOutputFile::TiledRgbaOutputFile
    (OStream &os,
     const Header &header,
     RgbaChannels rgbaChannels,
     int tileXSize,
     int tileYSize,
     LevelMode mode,
     LevelRoundingMode rmode,
     int numThreads)
:
    _outputFile (0),
    _toYa (0)
{
    Header hd (header);
    insertChannels (hd, rgbaChannels, os.fileName());
    hd.setTileDescription (TileDescription (tileXSize, tileYSize, mode, rmode));
    _outputFile = new TiledOutputFile (os, hd, numThreads);

    if (rgbaChannels & WRITE_Y)
	_toYa = new ToYa (*_outputFile, rgbaChannels);
}