| 91 | /* =========================================== */ |
| 92 | |
| 93 | void WebPImage::writeMetadata() { |
| 94 | if (io_->open() != 0) { |
| 95 | throw Error(ErrorCode::kerDataSourceOpenFailed, io_->path(), strError()); |
| 96 | } |
| 97 | IoCloser closer(*io_); |
| 98 | MemIo tempIo; |
| 99 | |
| 100 | doWriteMetadata(tempIo); // may throw |
| 101 | io_->close(); |
| 102 | io_->transfer(tempIo); // may throw |
| 103 | } // WebPImage::writeMetadata |
| 104 | |
| 105 | void WebPImage::doWriteMetadata(BasicIo& outIo) { |
| 106 | if (!io_->isopen()) |