Write ICCProfile
This commit is contained in:
+12
@@ -966,6 +966,7 @@ void XISFWriter::writeImageElement(const Image &image)
|
|||||||
writeFITSKeyword(fitsKeyword);
|
writeFITSKeyword(fitsKeyword);
|
||||||
|
|
||||||
writeCFA(image);
|
writeCFA(image);
|
||||||
|
writeICC(image._iccProfile);
|
||||||
|
|
||||||
_xml->writeEndElement();
|
_xml->writeEndElement();
|
||||||
}
|
}
|
||||||
@@ -1083,6 +1084,17 @@ void XISFWriter::writeCFA(const Image &image)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void XISFWriter::writeICC(const QByteArray &icc)
|
||||||
|
{
|
||||||
|
if(!icc.isEmpty())
|
||||||
|
{
|
||||||
|
QByteArray base64 = icc.toBase64();
|
||||||
|
_xml->writeStartElement("ICCProfile");
|
||||||
|
_xml->writeAttribute("location", "inline:base64");
|
||||||
|
_xml->writeCharacters(base64);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#define REGISTER_METATYPE(type) { int id = qMetaTypeId<type>(); \
|
#define REGISTER_METATYPE(type) { int id = qMetaTypeId<type>(); \
|
||||||
typeToId.insert({#type, id}); idToType.insert({id, #type}); }
|
typeToId.insert({#type, id}); idToType.insert({id, #type}); }
|
||||||
|
|
||||||
|
|||||||
@@ -266,6 +266,7 @@ private:
|
|||||||
void writeFITSKeyword(const FITSKeyword &keyword);
|
void writeFITSKeyword(const FITSKeyword &keyword);
|
||||||
void writeMetadata();
|
void writeMetadata();
|
||||||
void writeCFA(const Image &image);
|
void writeCFA(const Image &image);
|
||||||
|
void writeICC(const QByteArray &icc);
|
||||||
std::unique_ptr<QXmlStreamWriter> _xml;
|
std::unique_ptr<QXmlStreamWriter> _xml;
|
||||||
QByteArray _xisfHeader;
|
QByteArray _xisfHeader;
|
||||||
QByteArray _attachmentsData;
|
QByteArray _attachmentsData;
|
||||||
|
|||||||
Reference in New Issue
Block a user