WPILibC++  unspecified
JpegUtil.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2016-2017 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #ifndef CSCORE_JPEGUTIL_H_
9 #define CSCORE_JPEGUTIL_H_
10 
11 #include <string>
12 
13 #include <llvm/StringRef.h>
14 
15 namespace wpi {
16 class raw_istream;
17 } // namespace wpi
18 
19 namespace cs {
20 
21 bool IsJpeg(llvm::StringRef data);
22 
23 bool GetJpegSize(llvm::StringRef data, int* width, int* height);
24 
25 bool JpegNeedsDHT(const char* data, size_t* size, size_t* locSOF);
26 
27 llvm::StringRef JpegGetDHT();
28 
29 bool ReadJpeg(wpi::raw_istream& is, std::string& buf, int* width, int* height);
30 
31 } // namespace cs
32 
33 #endif // CSCORE_JPEGUTIL_H_
Definition: SinkImpl.h:19
Definition: SocketError.cpp:18
Definition: raw_istream.h:23
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:42