Skip to content

Commit 0d4a987

Browse files
committed
refactor(python): run clang-format on _repr_png_
Signed-off-by: glowies <[email protected]>
1 parent 96ecdeb commit 0d4a987

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/python/py_imagebuf.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
#include <memory>
88

9-
#include <OpenImageIO/platform.h>
109
#include <OpenImageIO/filesystem.h>
10+
#include <OpenImageIO/platform.h>
1111

1212

1313
namespace PyOpenImageIO {
@@ -260,13 +260,14 @@ ImageBuf_repr_png(const ImageBuf& self)
260260
return py::bytes();
261261
}
262262

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
265265

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);
268269
self.write(out.get());
269-
out->close ();
270+
out->close();
270271

271272
// Cast to const char* and return as python bytes
272273
const char* char_ptr = reinterpret_cast<const char*>(file_buffer.data());
@@ -516,8 +517,7 @@ declare_imagebuf(py::module& m)
516517
.def(
517518
"deepdata", [](ImageBuf& self) { return *self.deepdata(); },
518519
py::return_value_policy::reference_internal)
519-
.def(
520-
"_repr_png_", &ImageBuf_repr_png)
520+
.def("_repr_png_", &ImageBuf_repr_png)
521521

522522
// FIXME -- do we want to provide pixel iterators?
523523
;

0 commit comments

Comments
 (0)