|
6 | 6 |
|
7 | 7 | #include <memory> |
8 | 8 |
|
9 | | -#include <OpenImageIO/platform.h> |
10 | 9 | #include <OpenImageIO/filesystem.h> |
| 10 | +#include <OpenImageIO/platform.h> |
11 | 11 |
|
12 | 12 |
|
13 | 13 | namespace PyOpenImageIO { |
@@ -260,13 +260,14 @@ ImageBuf_repr_png(const ImageBuf& self) |
260 | 260 | return py::bytes(); |
261 | 261 | } |
262 | 262 |
|
263 | | - std::vector<unsigned char> file_buffer; // bytes will go here |
264 | | - Filesystem::IOVecOutput file_vec (file_buffer); // I/O proxy object |
| 263 | + std::vector<unsigned char> file_buffer; // bytes will go here |
| 264 | + Filesystem::IOVecOutput file_vec(file_buffer); // I/O proxy object |
265 | 265 |
|
266 | | - std::unique_ptr<ImageOutput> out = ImageOutput::create ("temp.png", &file_vec); |
267 | | - out->open ("temp.png", original_spec); |
| 266 | + std::unique_ptr<ImageOutput> out = ImageOutput::create("temp.png", |
| 267 | + &file_vec); |
| 268 | + out->open("temp.png", original_spec); |
268 | 269 | self.write(out.get()); |
269 | | - out->close (); |
| 270 | + out->close(); |
270 | 271 |
|
271 | 272 | // Cast to const char* and return as python bytes |
272 | 273 | const char* char_ptr = reinterpret_cast<const char*>(file_buffer.data()); |
@@ -516,8 +517,7 @@ declare_imagebuf(py::module& m) |
516 | 517 | .def( |
517 | 518 | "deepdata", [](ImageBuf& self) { return *self.deepdata(); }, |
518 | 519 | py::return_value_policy::reference_internal) |
519 | | - .def( |
520 | | - "_repr_png_", &ImageBuf_repr_png) |
| 520 | + .def("_repr_png_", &ImageBuf_repr_png) |
521 | 521 |
|
522 | 522 | // FIXME -- do we want to provide pixel iterators? |
523 | 523 | ; |
|
0 commit comments