Initial commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#include <fstream>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include "base64.h"
|
||||
#include "mimeImage.h"
|
||||
|
||||
|
||||
mimeImage::mimeImage()
|
||||
{
|
||||
}
|
||||
|
||||
mimeImage::mimeImage(const std::string& name) :
|
||||
m_name(name)
|
||||
{
|
||||
}
|
||||
|
||||
void mimeImage::appendData(const std::string& data)
|
||||
{
|
||||
if (data.empty())
|
||||
return;
|
||||
|
||||
m_imageData.append(data);
|
||||
}
|
||||
|
||||
const inputImage& mimeImage::decodeImageData()
|
||||
{
|
||||
boost::erase_all(m_imageData, "\r");
|
||||
m_inputImage.setImageData(base64_decode(m_imageData));
|
||||
return m_inputImage;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user