| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef CORE_FXCODEC_LBMP_FX_BMP_H_ | 7 #ifndef CORE_FXCODEC_LBMP_FX_BMP_H_ |
| 8 #define CORE_FXCODEC_LBMP_FX_BMP_H_ | 8 #define CORE_FXCODEC_LBMP_FX_BMP_H_ |
| 9 | 9 |
| 10 #include <setjmp.h> | 10 #include <setjmp.h> |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 BmpInfoHeaderPtr bmp_infoheader_ptr; | 77 BmpInfoHeaderPtr bmp_infoheader_ptr; |
| 78 int32_t width; | 78 int32_t width; |
| 79 int32_t height; | 79 int32_t height; |
| 80 uint32_t compress_flag; | 80 uint32_t compress_flag; |
| 81 int32_t components; | 81 int32_t components; |
| 82 int32_t src_row_bytes; | 82 int32_t src_row_bytes; |
| 83 int32_t out_row_bytes; | 83 int32_t out_row_bytes; |
| 84 uint8_t* out_row_buffer; | 84 uint8_t* out_row_buffer; |
| 85 uint16_t bitCounts; | 85 uint16_t bitCounts; |
| 86 uint32_t color_used; | 86 uint32_t color_used; |
| 87 FX_BOOL imgTB_flag; | 87 bool imgTB_flag; |
| 88 int32_t pal_num; | 88 int32_t pal_num; |
| 89 int32_t pal_type; | 89 int32_t pal_type; |
| 90 uint32_t* pal_ptr; | 90 uint32_t* pal_ptr; |
| 91 uint32_t data_size; | 91 uint32_t data_size; |
| 92 uint32_t img_data_offset; | 92 uint32_t img_data_offset; |
| 93 uint32_t img_ifh_size; | 93 uint32_t img_ifh_size; |
| 94 int32_t row_num; | 94 int32_t row_num; |
| 95 int32_t col_num; | 95 int32_t col_num; |
| 96 int32_t dpi_x; | 96 int32_t dpi_x; |
| 97 int32_t dpi_y; | 97 int32_t dpi_y; |
| 98 uint32_t mask_red; | 98 uint32_t mask_red; |
| 99 uint32_t mask_green; | 99 uint32_t mask_green; |
| 100 uint32_t mask_blue; | 100 uint32_t mask_blue; |
| 101 | 101 |
| 102 FX_BOOL (*bmp_get_data_position_fn)(bmp_decompress_struct_p bmp_ptr, | 102 bool (*bmp_get_data_position_fn)(bmp_decompress_struct_p bmp_ptr, |
| 103 uint32_t cur_pos); | 103 uint32_t cur_pos); |
| 104 void (*bmp_get_row_fn)(bmp_decompress_struct_p bmp_ptr, | 104 void (*bmp_get_row_fn)(bmp_decompress_struct_p bmp_ptr, |
| 105 int32_t row_num, | 105 int32_t row_num, |
| 106 uint8_t* row_buf); | 106 uint8_t* row_buf); |
| 107 uint8_t* next_in; | 107 uint8_t* next_in; |
| 108 uint32_t avail_in; | 108 uint32_t avail_in; |
| 109 uint32_t skip_size; | 109 uint32_t skip_size; |
| 110 int32_t decode_status; | 110 int32_t decode_status; |
| 111 }; | 111 }; |
| 112 void bmp_error(bmp_decompress_struct_p bmp_ptr, const FX_CHAR* err_msg); | 112 void bmp_error(bmp_decompress_struct_p bmp_ptr, const FX_CHAR* err_msg); |
| 113 bmp_decompress_struct_p bmp_create_decompress(); | 113 bmp_decompress_struct_p bmp_create_decompress(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 130 typedef bmp_compress_struct* bmp_compress_struct_p; | 130 typedef bmp_compress_struct* bmp_compress_struct_p; |
| 131 typedef bmp_compress_struct_p* bmp_compress_struct_pp; | 131 typedef bmp_compress_struct_p* bmp_compress_struct_pp; |
| 132 struct tag_bmp_compress_struct { | 132 struct tag_bmp_compress_struct { |
| 133 BmpFileHeader file_header; | 133 BmpFileHeader file_header; |
| 134 BmpInfoHeader info_header; | 134 BmpInfoHeader info_header; |
| 135 uint8_t* src_buf; | 135 uint8_t* src_buf; |
| 136 uint32_t src_pitch; | 136 uint32_t src_pitch; |
| 137 uint32_t src_row; | 137 uint32_t src_row; |
| 138 uint8_t src_bpp; | 138 uint8_t src_bpp; |
| 139 uint32_t src_width; | 139 uint32_t src_width; |
| 140 FX_BOOL src_free; | 140 bool src_free; |
| 141 uint32_t* pal_ptr; | 141 uint32_t* pal_ptr; |
| 142 uint16_t pal_num; | 142 uint16_t pal_num; |
| 143 uint8_t bit_type; | 143 uint8_t bit_type; |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 bmp_compress_struct_p bmp_create_compress(); | 146 bmp_compress_struct_p bmp_create_compress(); |
| 147 void bmp_destroy_compress(bmp_compress_struct_p bmp_ptr); | 147 void bmp_destroy_compress(bmp_compress_struct_p bmp_ptr); |
| 148 FX_BOOL bmp_encode_image(bmp_compress_struct_p bmp_ptr, | 148 bool bmp_encode_image(bmp_compress_struct_p bmp_ptr, |
| 149 uint8_t*& dst_buf, | 149 uint8_t*& dst_buf, |
| 150 uint32_t& dst_size); | 150 uint32_t& dst_size); |
| 151 | 151 |
| 152 uint16_t GetWord_LSBFirst(uint8_t* p); | 152 uint16_t GetWord_LSBFirst(uint8_t* p); |
| 153 void SetWord_LSBFirst(uint8_t* p, uint16_t v); | 153 void SetWord_LSBFirst(uint8_t* p, uint16_t v); |
| 154 | 154 |
| 155 #endif // CORE_FXCODEC_LBMP_FX_BMP_H_ | 155 #endif // CORE_FXCODEC_LBMP_FX_BMP_H_ |
| OLD | NEW |