Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
bmp_decoder.h
Go to the documentation of this file.
1// Copyright 2016 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef CORE_FXCODEC_BMP_BMP_DECODER_H_
8#define CORE_FXCODEC_BMP_BMP_DECODER_H_
9
10#include <memory>
11#include <vector>
12
13#include "core/fxcodec/progressive_decoder_iface.h"
14#include "core/fxcrt/fx_system.h"
15#include "core/fxcrt/retain_ptr.h"
16#include "third_party/base/containers/span.h"
17
18#ifndef PDF_ENABLE_XFA_BMP
19#error "BMP must be enabled"
20#endif
21
22namespace fxcodec {
23
24class CFX_DIBAttribute;
25
27 public:
28 class Delegate {
29 public:
30 virtual bool BmpInputImagePositionBuf(uint32_t rcd_pos) = 0;
31 virtual void BmpReadScanline(uint32_t row_num,
32 pdfium::span<const uint8_t> row_buf) = 0;
33 };
34
36
38 Delegate* pDelegate);
40 int32_t* width,
41 int32_t* height,
42 bool* tb_flag,
43 int32_t* components,
44 int32_t* pal_num,
45 const std::vector<uint32_t>** palette,
46 CFX_DIBAttribute* pAttribute);
49 static bool Input(ProgressiveDecoderIface::Context* pContext,
50 RetainPtr<CFX_CodecMemory> codec_memory);
51
52 BmpDecoder() = delete;
53 BmpDecoder(const BmpDecoder&) = delete;
54 BmpDecoder& operator=(const BmpDecoder&) = delete;
55};
56
57} // namespace fxcodec
58
59using BmpDecoder = fxcodec::BmpDecoder;
60
61#endif // CORE_FXCODEC_BMP_BMP_DECODER_H_
virtual void BmpReadScanline(uint32_t row_num, pdfium::span< const uint8_t > row_buf)=0
virtual bool BmpInputImagePositionBuf(uint32_t rcd_pos)=0
static bool Input(ProgressiveDecoderIface::Context *pContext, RetainPtr< CFX_CodecMemory > codec_memory)
static Status ReadHeader(ProgressiveDecoderIface::Context *pContext, int32_t *width, int32_t *height, bool *tb_flag, int32_t *components, int32_t *pal_num, const std::vector< uint32_t > **palette, CFX_DIBAttribute *pAttribute)
BmpDecoder(const BmpDecoder &)=delete
static Status LoadImage(ProgressiveDecoderIface::Context *pContext)
static std::unique_ptr< ProgressiveDecoderIface::Context > StartDecode(Delegate *pDelegate)
static FX_FILESIZE GetAvailInput(ProgressiveDecoderIface::Context *pContext)
BmpDecoder & operator=(const BmpDecoder &)=delete
#define FX_FILESIZE
Definition fx_types.h:19