/
clip_win_wic.h
44 lines (30 loc) · 997 Bytes
/
clip_win_wic.h
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
40
41
42
43
44
// Clip Library
// Copyright (c) 2020-2024 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef CLIP_WIN_WIC_H_INCLUDED
#define CLIP_WIN_WIC_H_INCLUDED
#pragma once
#if !CLIP_ENABLE_IMAGE
#error This file can be include only when CLIP_ENABLE_IMAGE is defined
#endif
#include <cstdint>
#include <windows.h>
namespace clip {
class image;
struct image_spec;
namespace win {
//////////////////////////////////////////////////////////////////////
// Encode the image as PNG format
bool write_png_on_stream(const image& image, IStream* stream);
HGLOBAL write_png(const image& image);
//////////////////////////////////////////////////////////////////////
// Decode the clipboard data from PNG format
bool read_png(const uint8_t* buf,
const UINT len,
image* output_image,
image_spec* output_spec);
} // namespace win
} // namespace clip
#endif // CLIP_WIN_WIC_H_INCLUDED