BeJpeg.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
10 #include <Bentley/ByteStream.h>
11 
13 
14 //=======================================================================================
15 // @bsiclass Bentley Systems
16 //=======================================================================================
18  {
24  };
25 
26 enum class BeJpegBottomUp {No=0, Yes=1};
27 
28 //=======================================================================================
29 // @bsiclass Bentley Systems
30 //=======================================================================================
32  {
33 private:
34  void* m_jpegImpl;
35 
36 public:
38 
40 
47  BentleyStatus ReadHeader(uint32_t& width, uint32_t& height, Byte const* jpegBuffer, size_t jpegBufferSize);
48 
57  BentleyStatus Decompress(Byte* pOutBuffer, size_t outBufferSize, Byte const* jpegBuffer, size_t jpegBufferSize, BeJpegPixelType pixelType, BeJpegBottomUp bottomUp=BeJpegBottomUp::No);
58  };
59 
60 //=======================================================================================
61 // @bsiclass Bentley Systems
62 //=======================================================================================
64  {
65 private:
66  void* m_jpegImpl;
67 
68 public:
71 
74 
85  BentleyStatus Compress(ByteStream& outBuf, uint8_t const* srcBuffer, uint32_t width, uint32_t height, BeJpegPixelType pixelType, int quality, BeJpegBottomUp bottomUp=BeJpegBottomUp::No);
86 
98  BentleyStatus Compress(ByteStream& outBuf, uint8_t const* srcBuffer, size_t srcPitch, uint32_t width, uint32_t height, BeJpegPixelType pixelType, int quality, BeJpegBottomUp bottomUp=BeJpegBottomUp::No);
99  };
100 
Definition: BeJpeg.h:19
Definition: BeJpeg.h:22
#define BEGIN_BENTLEY_NAMESPACE
Definition: Bentley.r.h:24
BeJpegBottomUp
Definition: BeJpeg.h:26
Definition: BeJpeg.h:63
BentleyStatus
Definition: Bentley.h:208
A stream of bytes in a resizeable buffer.
Definition: ByteStream.h:22
Definition: BeJpeg.h:20
Definition: BeJpeg.h:31
Definition: BeJpeg.h:23
#define END_BENTLEY_NAMESPACE
Definition: Bentley.r.h:25
unsigned char Byte
Definition: Bentley.r.h:143
BeJpegPixelType
Definition: BeJpeg.h:17
unsigned int uint32_t
Definition: Bentley.r.h:93
Definition: BeJpeg.h:21
unsigned char uint8_t
Definition: Bentley.r.h:89

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.