OEWriteImageToString¶
std::string OEWriteImageToString(const std::string &ext,
const OEImage &image)
Writes the image into a string.
- ext
The extension which determine the type of the image.
- image
The OEImage object which is being written into the string.
Example:
mol = oechem.OEGraphMol()
oechem.OESmilesToMol(mol, "c1ccccc1")
oedepict.OEPrepareDepiction(mol)
image = oedepict.OEImage(200, 200)
oedepict.OERenderMolecule(image, mol)
data = oedepict.OEWriteImageToString("svg", image)
Note
In Python 3 the OEWriteImageToString
function returns bytes
.