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
tiff_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_TIFF_TIFF_DECODER_H_
8#define CORE_FXCODEC_TIFF_TIFF_DECODER_H_
9
10#include <memory>
11
12#include "core/fxcodec/progressive_decoder_iface.h"
13#include "core/fxcrt/retain_ptr.h"
14
15#ifndef PDF_ENABLE_XFA_TIFF
16#error "TIFF must be enabled"
17#endif
18
19class CFX_DIBitmap;
21
22namespace fxcodec {
23
24class CFX_DIBAttribute;
25
27 public:
29 const RetainPtr<IFX_SeekableReadStream>& file_ptr);
30
32 int32_t frame,
33 int32_t* width,
34 int32_t* height,
35 int32_t* comps,
36 int32_t* bpc,
37 CFX_DIBAttribute* pAttribute);
38 // `bitmap` must be `FXDIB_Format::kBgra`.
39 static bool Decode(ProgressiveDecoderIface::Context* ctx,
40 RetainPtr<CFX_DIBitmap> bitmap);
41
42 TiffDecoder() = delete;
43 TiffDecoder(const TiffDecoder&) = delete;
44 TiffDecoder& operator=(const TiffDecoder&) = delete;
45};
46
47} // namespace fxcodec
48
50
51#endif // CORE_FXCODEC_TIFF_TIFF_DECODER_H_
#define DCHECK
Definition check.h:33
#define CHECK_EQ(x, y)
Definition check_op.h:10
RetainPtr< IFX_SeekableReadStream > io_in() const
uint32_t offset() const
bool InitDecoder(const RetainPtr< IFX_SeekableReadStream > &file_ptr)
~CTiffContext() override=default
CTiffContext()=default
bool LoadFrameInfo(int32_t frame, int32_t *width, int32_t *height, int32_t *comps, int32_t *bpc, CFX_DIBAttribute *pAttribute)
bool Decode(RetainPtr< CFX_DIBitmap > bitmap)
void set_offset(uint32_t offset)
static bool Decode(ProgressiveDecoderIface::Context *ctx, RetainPtr< CFX_DIBitmap > bitmap)
static bool LoadFrameInfo(ProgressiveDecoderIface::Context *ctx, int32_t frame, int32_t *width, int32_t *height, int32_t *comps, int32_t *bpc, CFX_DIBAttribute *pAttribute)
TiffDecoder(const TiffDecoder &)=delete
static std::unique_ptr< ProgressiveDecoderIface::Context > CreateDecoder(const RetainPtr< IFX_SeekableReadStream > &file_ptr)
TiffDecoder & operator=(const TiffDecoder &)=delete
#define UNSAFE_BUFFERS(...)
#define UNSAFE_TODO(...)
FXDIB_Format
Definition fx_dib.h:21
UNSAFE_BUFFER_USAGE void * FXSYS_memset(void *ptr1, int val, size_t len)
UNSAFE_BUFFER_USAGE void * FXSYS_memcpy(void *ptr1, const void *ptr2, size_t len)
void FXMEM_DefaultFree(void *pointer)
Definition fx_memory.cpp:78
pdfium::CheckedNumeric< FX_FILESIZE > FX_SAFE_FILESIZE
pdfium::CheckedNumeric< uint32_t > FX_SAFE_UINT32
pdfium::CheckedNumeric< int32_t > FX_SAFE_INT32
#define FX_FILESIZE
Definition fx_types.h:19
#define NOTREACHED_NORETURN()
Definition notreached.h:22
void _TIFFfree(void *ptr)
void * _TIFFrealloc(void *ptr, tmsize_t size)
int _TIFFmemcmp(const void *ptr1, const void *ptr2, tmsize_t size)
void _TIFFmemset(void *ptr, int val, tmsize_t size)
void * _TIFFcalloc(tmsize_t nmemb, tmsize_t siz)
void * _TIFFmalloc(tmsize_t size)
void _TIFFmemcpy(void *des, const void *src, tmsize_t size)
fxcodec::TiffDecoder TiffDecoder