ultimatepp/uppsrc/plugin/ppm/ppmenc.cpp
cxl 597466fea8 uppsrc: NAMESPACE_UPP / END_UPP_NAMESPACE removed
git-svn-id: svn://ultimatepp.org/upp/trunk@10186 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2016-08-26 17:15:30 +00:00

22 lines
No EOL
385 B
C++

#include "ppm.h"
namespace Upp {
int PPMEncoder::GetPaletteCount()
{
return 0;
}
void PPMEncoder::Start(Size sz)
{
size = sz;
format.Set24be(0xff0000, 0x00ff00, 0x0000ff);
GetStream() << "P6\n" << AsString(sz.cx) << ' ' << AsString(sz.cy) << "\n" << 255 << "\n";
}
void PPMEncoder::WriteLineRaw(const byte *data)
{
GetStream().Put(data, size.cx * 3);
}
}