| 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 #include "core/src/fxcodec/lbmp/fx_bmp.h" | 7 #include "core/fxcodec/lbmp/fx_bmp.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| 11 namespace { | 11 namespace { |
| 12 | 12 |
| 13 const size_t kBmpCoreHeaderSize = 12; | 13 const size_t kBmpCoreHeaderSize = 12; |
| 14 const size_t kBmpInfoHeaderSize = 40; | 14 const size_t kBmpInfoHeaderSize = 40; |
| 15 | 15 |
| 16 // TODO(thestig): Replace with FXDWORD_GET_LSBFIRST? | 16 // TODO(thestig): Replace with FXDWORD_GET_LSBFIRST? |
| 17 FX_DWORD GetDWord_LSBFirst(uint8_t* p) { | 17 FX_DWORD GetDWord_LSBFirst(uint8_t* p) { |
| (...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 case BMP_RLE4: | 939 case BMP_RLE4: |
| 940 bmp_encode_rle4(bmp_ptr, dst_buf, dst_size); | 940 bmp_encode_rle4(bmp_ptr, dst_buf, dst_size); |
| 941 break; | 941 break; |
| 942 default: | 942 default: |
| 943 break; | 943 break; |
| 944 } | 944 } |
| 945 bmp_ptr->file_header.bfSize = dst_size; | 945 bmp_ptr->file_header.bfSize = dst_size; |
| 946 WriteFileHeader(&bmp_ptr->file_header, dst_buf); | 946 WriteFileHeader(&bmp_ptr->file_header, dst_buf); |
| 947 return TRUE; | 947 return TRUE; |
| 948 } | 948 } |
| OLD | NEW |