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

Side by Side Diff: core/include/fxcodec/fx_codec.h

Issue 1425983002: XFA: remove unsafe exif parsing code (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Null check. Created 5 years, 1 month 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 | « no previous file | core/src/fxcodec/codec/codec_int.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_INCLUDE_FXCODEC_FX_CODEC_H_ 7 #ifndef CORE_INCLUDE_FXCODEC_FX_CODEC_H_
8 #define CORE_INCLUDE_FXCODEC_FX_CODEC_H_ 8 #define CORE_INCLUDE_FXCODEC_FX_CODEC_H_
9 9
10 #include <map>
10 #include <vector> 11 #include <vector>
11 12
12 #include "../../../third_party/base/nonstd_unique_ptr.h" 13 #include "../../../third_party/base/nonstd_unique_ptr.h"
13 #include "../fxcrt/fx_basic.h" 14 #include "../fxcrt/fx_basic.h"
14 #include "../fxcrt/fx_coordinates.h" 15 #include "../fxcrt/fx_coordinates.h"
15 #include "fx_codec_def.h" 16 #include "fx_codec_def.h"
16 #include "fx_codec_provider.h" 17 #include "fx_codec_provider.h"
17 18
18 class CFX_DIBSource; 19 class CFX_DIBSource;
19 class CJPX_Decoder; 20 class CJPX_Decoder;
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 FX_FLOAT& G, 496 FX_FLOAT& G,
496 FX_FLOAT& B); 497 FX_FLOAT& B);
497 void AdobeCMYK_to_sRGB1(uint8_t c, 498 void AdobeCMYK_to_sRGB1(uint8_t c,
498 uint8_t m, 499 uint8_t m,
499 uint8_t y, 500 uint8_t y,
500 uint8_t k, 501 uint8_t k,
501 uint8_t& R, 502 uint8_t& R,
502 uint8_t& G, 503 uint8_t& G,
503 uint8_t& B); 504 uint8_t& B);
504 FX_BOOL MD5ComputeID(const void* buf, FX_DWORD dwSize, uint8_t ID[16]); 505 FX_BOOL MD5ComputeID(const void* buf, FX_DWORD dwSize, uint8_t ID[16]);
506
505 class CFX_DIBAttribute { 507 class CFX_DIBAttribute {
506 public: 508 public:
507 CFX_DIBAttribute(); 509 CFX_DIBAttribute();
508 ~CFX_DIBAttribute(); 510 ~CFX_DIBAttribute();
509 511
510 int32_t m_nXDPI; 512 int32_t m_nXDPI;
511
512 int32_t m_nYDPI; 513 int32_t m_nYDPI;
513
514 FX_FLOAT m_fAspectRatio; 514 FX_FLOAT m_fAspectRatio;
515
516 FX_WORD m_wDPIUnit; 515 FX_WORD m_wDPIUnit;
517
518 CFX_ByteString m_strAuthor; 516 CFX_ByteString m_strAuthor;
519
520 uint8_t m_strTime[20]; 517 uint8_t m_strTime[20];
521
522 int32_t m_nGifLeft; 518 int32_t m_nGifLeft;
523 int32_t m_nGifTop; 519 int32_t m_nGifTop;
524
525 FX_DWORD* m_pGifLocalPalette; 520 FX_DWORD* m_pGifLocalPalette;
526
527 FX_DWORD m_nGifLocalPalNum; 521 FX_DWORD m_nGifLocalPalNum;
528
529 int32_t m_nBmpCompressType; 522 int32_t m_nBmpCompressType;
530 class IFX_DIBAttributeExif* m_pExif; 523 std::map<FX_DWORD, void*> m_Exif;
531 };
532 class IFX_DIBAttributeExif {
533 public:
534 virtual ~IFX_DIBAttributeExif(){};
535 virtual FX_BOOL GetInfo(FX_WORD tag, void* val) = 0;
536 }; 524 };
537 525
538 FX_BOOL FaxSkipEOL(const uint8_t* src_buf, int bitsize, int& bitpos); 526 FX_BOOL FaxSkipEOL(const uint8_t* src_buf, int bitsize, int& bitpos);
539 FX_BOOL FaxGet1DLine(const uint8_t* src_buf, 527 FX_BOOL FaxGet1DLine(const uint8_t* src_buf,
540 int bitsize, 528 int bitsize,
541 int& bitpos, 529 int& bitpos,
542 uint8_t* dest_buf, 530 uint8_t* dest_buf,
543 int columns); 531 int columns);
544 FX_BOOL FaxG4GetRow(const uint8_t* src_buf, 532 FX_BOOL FaxG4GetRow(const uint8_t* src_buf,
545 int bitsize, 533 int bitsize,
546 int& bitpos, 534 int& bitpos,
547 uint8_t* dest_buf, 535 uint8_t* dest_buf,
548 const uint8_t* ref_buf, 536 const uint8_t* ref_buf,
549 int columns); 537 int columns);
550 void FaxG4Decode(const uint8_t* src_buf, 538 void FaxG4Decode(const uint8_t* src_buf,
551 FX_DWORD src_size, 539 FX_DWORD src_size,
552 int* pbitpos, 540 int* pbitpos,
553 uint8_t* dest_buf, 541 uint8_t* dest_buf,
554 int width, 542 int width,
555 int height, 543 int height,
556 int pitch); 544 int pitch);
557 545
558 #endif // CORE_INCLUDE_FXCODEC_FX_CODEC_H_ 546 #endif // CORE_INCLUDE_FXCODEC_FX_CODEC_H_
OLDNEW
« no previous file with comments | « no previous file | core/src/fxcodec/codec/codec_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698