Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: core/fxcodec/codec/ccodec_jpegmodule.h

Issue 1876023003: Remove ICodec_* Interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fxcodec/codec/ccodec_jbig2module.h ('k') | core/fxcodec/codec/ccodec_jpxmodule.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
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_CODEC_CCODEC_JPEGMODULE_H_
8 #define CORE_FXCODEC_CODEC_CCODEC_JPEGMODULE_H_
9
10 #include "core/fxcrt/include/fx_system.h"
11
12 class CCodec_ScanlineDecoder;
13 class CFX_DIBSource;
14 struct FXJPEG_Context;
15
16 #ifdef PDF_ENABLE_XFA
17 class CFX_DIBAttribute;
18 #endif // PDF_ENABLE_XFA
19
20 class CCodec_JpegModule {
21 public:
22 CCodec_JpegModule() {}
23 CCodec_ScanlineDecoder* CreateDecoder(const uint8_t* src_buf,
24 uint32_t src_size,
25 int width,
26 int height,
27 int nComps,
28 FX_BOOL ColorTransform);
29 FX_BOOL LoadInfo(const uint8_t* src_buf,
30 uint32_t src_size,
31 int& width,
32 int& height,
33 int& num_components,
34 int& bits_per_components,
35 FX_BOOL& color_transform,
36 uint8_t** icc_buf_ptr = nullptr,
37 uint32_t* icc_length = nullptr);
38 FX_BOOL Encode(const CFX_DIBSource* pSource,
39 uint8_t*& dest_buf,
40 FX_STRSIZE& dest_size,
41 int quality = 75,
42 const uint8_t* icc_buf = nullptr,
43 uint32_t icc_length = 0);
44 FXJPEG_Context* Start();
45 void Finish(FXJPEG_Context* pContext);
46 void Input(FXJPEG_Context* pContext,
47 const uint8_t* src_buf,
48 uint32_t src_size);
49
50 #ifndef PDF_ENABLE_XFA
51 int ReadHeader(FXJPEG_Context* pContext,
52 int* width,
53 int* height,
54 int* nComps);
55 #else // PDF_ENABLE_XFA
56 int ReadHeader(FXJPEG_Context* pContext,
57 int* width,
58 int* height,
59 int* nComps,
60 CFX_DIBAttribute* pAttribute);
61 #endif // PDF_ENABLE_XFA
62
63 int StartScanline(FXJPEG_Context* pContext, int down_scale);
64 FX_BOOL ReadScanline(FXJPEG_Context* pContext, uint8_t* dest_buf);
65 uint32_t GetAvailInput(FXJPEG_Context* pContext, uint8_t** avail_buf_ptr);
66 };
67
68 #endif // CORE_FXCODEC_CODEC_CCODEC_JPEGMODULE_H_
OLDNEW
« no previous file with comments | « core/fxcodec/codec/ccodec_jbig2module.h ('k') | core/fxcodec/codec/ccodec_jpxmodule.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698