| 123456789101112131415161718192021222324252627282930 |
- #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;
- }
|