Move to new Build System
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
#include "MimeImage.h"
|
||||
#include "Util/Base64.h"
|
||||
#include <StringAlgorithm.h>
|
||||
#include <fstream>
|
||||
|
||||
|
||||
namespace Image {
|
||||
|
||||
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 JpegImage& MimeImage::DecodeImageData()
|
||||
{
|
||||
StringAlgorithm::erase_all(m_imageData, '\r');
|
||||
m_jpegImage.SetImageData(Util::Base64::Decode(m_imageData));
|
||||
return m_jpegImage;
|
||||
}
|
||||
|
||||
} // namespace Image
|
||||
|
||||
Reference in New Issue
Block a user