Files
2026-06-22 09:39:31 +07:00

16 lines
471 B
C++

#pragma once
#include <cstdint>
#include <string>
class PhotoHandler {
public:
// Writes |bgra| pixels (already flipped by the caller) as a JPEG to |path|.
// Returns true on success; sets |error| on failure.
static bool Write(const uint8_t* bgra, int width, int height,
const std::wstring& path, std::string* error);
// Generates a unique temp-file path for a photo from |camera_id|.
static std::wstring GeneratePath(int camera_id);
};