mirror of
https://github.com/zeldaret/botw
synced 2026-06-07 03:47:57 -04:00
18c60323a9
git subrepo clone https://github.com/open-ead/sead lib/sead subrepo: subdir: "lib/sead" merged: "1b66e825d" upstream: origin: "https://github.com/open-ead/sead" branch: "master" commit: "1b66e825d" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" git subrepo clone (merge) https://github.com/open-ead/nnheaders lib/NintendoSDK subrepo: subdir: "lib/NintendoSDK" merged: "9ee21399f" upstream: origin: "https://github.com/open-ead/nnheaders" branch: "master" commit: "9ee21399f" git-subrepo: version: "0.4.3" origin: "ssh://git@github.com/ingydotnet/git-subrepo" commit: "2f68596" git subrepo clone https://github.com/open-ead/agl lib/agl subrepo: subdir: "lib/agl" merged: "7c063271b" upstream: origin: "https://github.com/open-ead/agl" branch: "master" commit: "7c063271b" git-subrepo: version: "0.4.3" origin: "ssh://git@github.com/ingydotnet/git-subrepo" commit: "2f68596" git subrepo clone https://github.com/open-ead/EventFlow lib/EventFlow subrepo: subdir: "lib/EventFlow" merged: "c35d21b34" upstream: origin: "https://github.com/open-ead/EventFlow" branch: "master" commit: "c35d21b34" git-subrepo: version: "0.4.3" origin: "ssh://git@github.com/ingydotnet/git-subrepo" commit: "2f68596"
50 lines
1.1 KiB
C++
50 lines
1.1 KiB
C++
/**
|
|
* @file image.h
|
|
* @brief JPEG decoding library.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <nn/types.h>
|
|
|
|
namespace nn {
|
|
namespace image {
|
|
// there's probably more
|
|
enum JpegStatus {
|
|
OK = 0,
|
|
INVALID_FORMAT = -32,
|
|
UNSUPPORTED_FORMAT = -33,
|
|
OUT_OF_MEMORY = -64,
|
|
};
|
|
|
|
enum PixelFormat { RGBA32, RGB24 };
|
|
|
|
enum ProcessStage { UNREGISTERED = 0, REGISTERED = 1, ANALYZED = 2 };
|
|
|
|
struct Dimension {
|
|
f32 width;
|
|
f32 height;
|
|
};
|
|
|
|
class JpegDecoder {
|
|
public:
|
|
JpegDecoder();
|
|
virtual ~JpegDecoder();
|
|
|
|
void SetImageData(void const* source, u64 size);
|
|
nn::image::JpegStatus Analyze();
|
|
nn::image::Dimension GetAnalyzedDimension() const;
|
|
s64 GetAnalyzedWorkBufferSize() const;
|
|
JpegStatus Decode(void* out, s64, s32 alignment, void*, s64);
|
|
|
|
nn::image::ProcessStage mProcessStage; // _8
|
|
void* mData; // _C
|
|
s64 mSize; // _14
|
|
s32 _18;
|
|
nn::image::PixelFormat mFormat; // _1C
|
|
Dimension mImgDimensions; // _20
|
|
s64 _28;
|
|
// rest is related to EXIF processing
|
|
};
|
|
}; // namespace image
|
|
}; // namespace nn
|