-
Notifications
You must be signed in to change notification settings - Fork 9
/
deAi7Thumb.h
30 lines (19 loc) · 769 Bytes
/
deAi7Thumb.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
#ifndef DEAI7THUMB_H_INCLUDED
#define DEAI7THUMB_H_INCLUDED
#include <string>
#include <windows.h>>
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <algorithm>
using std::string;
// Decode a Hex string.
string decodeHex(const byte* src, long srcSize);
// Decode an Illustrator thumbnail that follows after %AI7_Thumbnail.
string decodeAi7Thumbnail(const string& src);
// Create a PNM image from raw RGB data.
string makeBmp(size_t width, size_t height, const string& rgb);
// 解码 %AI7_Thumbnail: 信息到PNG文件
bool decode_Ai7Thumb_toPng(string& AI7Thumb, size_t width, size_t height, const char* pngfilename);
bool rgb_makeBmp_tofile(string& rgb, size_t width, size_t height, FILE* bmpfilename);
#endif // DEAI7THUMB_H_INCLUDED