Write ICCProfile
This commit is contained in:
+12
@@ -966,6 +966,7 @@ void XISFWriter::writeImageElement(const Image &image)
|
||||
writeFITSKeyword(fitsKeyword);
|
||||
|
||||
writeCFA(image);
|
||||
writeICC(image._iccProfile);
|
||||
|
||||
_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>(); \
|
||||
typeToId.insert({#type, id}); idToType.insert({id, #type}); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user