This commit is contained in:
Zach DeCook 2026-03-11 04:14:03 +07:00 committed by GitHub
commit b549359b60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,9 +17,6 @@ std::expected<cairo_surface_t*, std::string> JPEG::createSurfaceFromJPEG(const s
if (!std::filesystem::exists(path))
return std::unexpected("loading jpeg: file doesn't exist");
if (__BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__)
return std::unexpected("loading jpeg: cannot load on big endian");
std::ifstream file(path, std::ios::binary | std::ios::ate);
file.exceptions(std::ifstream::failbit | std::ifstream::badbit | std::ifstream::eofbit);
std::vector<uint8_t> bytes(file.tellg());