-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDecodeTypes.h
More file actions
42 lines (34 loc) · 1.01 KB
/
Copy pathDecodeTypes.h
File metadata and controls
42 lines (34 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include "ImageRequest.h"
#include "DecodedImage.h"
#include <memory>
#include <span>
#include <cstdint>
#include <windows.h>
namespace ImageCore
{
// Explicit decode input (optional):
// - bytes: full file bytes (prefetched by I/O stage)
// - header: first kProbeSize bytes (used for magic/probing without extra disk I/O)
struct DecodeInput
{
std::span<const uint8_t> bytes {};
std::span<const uint8_t> header {};
};
// Decode result (unified payload).
struct PipelineResult
{
HRESULT hr { E_FAIL };
DecodedImage image {};
Size imageSize { 0.0f, 0.0f };
PipelineResult() = default;
explicit PipelineResult(HRESULT h)
: hr(h)
{
}
PipelineResult(const PipelineResult&) = delete;
PipelineResult& operator=(const PipelineResult&) = delete;
PipelineResult(PipelineResult&&) noexcept = default;
PipelineResult& operator=(PipelineResult&&) noexcept = default;
};
}