Develop and Download Open Source Software

Browse CVS Repository

Contents of /mame32jp/mame32jp/src/png.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download) (as text)
Wed Apr 24 03:53:20 2002 UTC (21 years, 11 months ago) by zero
Branch: MAIN
CVS Tags: ver_0_60_1, ver0_59_13, ver0_59_14, ver0_60_2, ver0_60_3, ver0_60_4, ver0_60_5, HEAD
Changes since 1.4: +0 -0 lines
File MIME type: text/x-chdr
*** empty log message ***

1
2 #ifndef MAME_PNG_H
3 #define MAME_PNG_H
4
5
6 #define PNG_Signature "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A"
7 #define MNG_Signature "\x8A\x4D\x4E\x47\x0D\x0A\x1A\x0A"
8
9 #define PNG_CN_IHDR 0x49484452L /* Chunk names */
10 #define PNG_CN_PLTE 0x504C5445L
11 #define PNG_CN_IDAT 0x49444154L
12 #define PNG_CN_IEND 0x49454E44L
13 #define PNG_CN_gAMA 0x67414D41L
14 #define PNG_CN_sBIT 0x73424954L
15 #define PNG_CN_cHRM 0x6348524DL
16 #define PNG_CN_tRNS 0x74524E53L
17 #define PNG_CN_bKGD 0x624B4744L
18 #define PNG_CN_hIST 0x68495354L
19 #define PNG_CN_tEXt 0x74455874L
20 #define PNG_CN_zTXt 0x7A545874L
21 #define PNG_CN_pHYs 0x70485973L
22 #define PNG_CN_oFFs 0x6F464673L
23 #define PNG_CN_tIME 0x74494D45L
24 #define PNG_CN_sCAL 0x7343414CL
25
26 #define PNG_PF_None 0 /* Prediction filters */
27 #define PNG_PF_Sub 1
28 #define PNG_PF_Up 2
29 #define PNG_PF_Average 3
30 #define PNG_PF_Paeth 4
31
32 #define MNG_CN_MHDR 0x4D484452L /* MNG Chunk names */
33 #define MNG_CN_MEND 0x4D454E44L
34 #define MNG_CN_TERM 0x5445524DL
35 #define MNG_CN_BACK 0x4241434BL
36
37
38 /* PNG support */
39 struct png_info {
40 UINT32 width, height;
41 UINT32 xres, yres;
42 struct rectangle screen;
43 double xscale, yscale;
44 double source_gamma;
45 UINT32 chromaticities[8];
46 UINT32 resolution_unit, offset_unit, scale_unit;
47 UINT8 bit_depth;
48 UINT32 significant_bits[4];
49 UINT32 background_color[4];
50 UINT8 color_type;
51 UINT8 compression_method;
52 UINT8 filter_method;
53 UINT8 interlace_method;
54 UINT32 num_palette;
55 UINT8 *palette;
56 UINT32 num_trans;
57 UINT8 *trans;
58 UINT8 *image;
59
60 /* The rest is private and should not be used
61 * by the public functions
62 */
63 UINT8 bpp;
64 UINT32 rowbytes;
65 UINT8 *zimage;
66 UINT32 zlength;
67 UINT8 *fimage;
68 };
69
70 int png_verify_signature (void *fp);
71 int png_inflate_image (struct png_info *p);
72 int png_read_file(void *fp, struct png_info *p);
73 int png_read_info(void *fp, struct png_info *p);
74 int png_expand_buffer_8bit (struct png_info *p);
75 void png_delete_unused_colors (struct png_info *p);
76 int png_add_text (const char *keyword, const char *text);
77 int png_unfilter(struct png_info *p);
78 int png_filter(struct png_info *p);
79 int png_deflate_image(struct png_info *p);
80 int png_write_sig(void *fp);
81 int png_write_datastream(void *fp, struct png_info *p);
82 int png_write_bitmap(void *fp, struct mame_bitmap *bitmap);
83 int mng_capture_start(void *fp, struct mame_bitmap *bitmap);
84 int mng_capture_frame(void *fp, struct mame_bitmap *bitmap);
85 int mng_capture_stop(void *fp);
86 int mng_capture_status(void);
87 #endif
88

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26