| 312 | } // PsdImage::readResourceBlock |
| 313 | |
| 314 | void PsdImage::writeMetadata() { |
| 315 | if (io_->open() != 0) { |
| 316 | throw Error(ErrorCode::kerDataSourceOpenFailed, io_->path(), strError()); |
| 317 | } |
| 318 | IoCloser closer(*io_); |
| 319 | MemIo tempIo; |
| 320 | |
| 321 | doWriteMetadata(tempIo); // may throw |
| 322 | io_->close(); |
| 323 | io_->transfer(tempIo); // may throw |
| 324 | |
| 325 | } // PsdImage::writeMetadata |
| 326 | |
| 327 | void PsdImage::doWriteMetadata(BasicIo& outIo) { |
| 328 | if (!io_->isopen()) |