| 466 | } |
| 467 | |
| 468 | Image Image::convert(PixelFormat pixelFormat) const { |
| 469 | Image converted(m_width, m_height, pixelFormat); |
| 470 | converted.copyInto(Vec2U(), *this); |
| 471 | return converted; |
| 472 | } |
| 473 | |
| 474 | void Image::writePng(IODevicePtr device) const { |
| 475 | auto writePngData = [](png_structp pngPtr, png_bytep data, png_size_t length) { |