| 114 | } |
| 115 | |
| 116 | void PgfImage::writeMetadata() { |
| 117 | if (io_->open() != 0) { |
| 118 | throw Error(ErrorCode::kerDataSourceOpenFailed, io_->path(), strError()); |
| 119 | } |
| 120 | IoCloser closer(*io_); |
| 121 | MemIo tempIo; |
| 122 | |
| 123 | doWriteMetadata(tempIo); // may throw |
| 124 | io_->close(); |
| 125 | io_->transfer(tempIo); // may throw |
| 126 | |
| 127 | } // PgfImage::writeMetadata |
| 128 | |
| 129 | void PgfImage::doWriteMetadata(BasicIo& outIo) { |
| 130 | if (!io_->isopen()) |