| 144 | } |
| 145 | |
| 146 | std::wstring PtrToWString(const void *ptr, bool hex) { |
| 147 | std::wstringstream ss; |
| 148 | if (hex) { |
| 149 | ss << L"0x" << std::hex << reinterpret_cast<uintptr_t>(ptr); |
| 150 | } else { |
| 151 | ss << reinterpret_cast<uintptr_t>(ptr); |
| 152 | } |
| 153 | return ss.str(); |
| 154 | } |
| 155 | |
| 156 | std::vector<uchar> BuildBmp32TopDown(int width, int height, const std::vector<uchar> &bgra_pixels) { |
| 157 | const size_t pixel_bytes = static_cast<size_t>(width) * height * 4; |