Files
allwpilib/src/main/native/cpp/JpegUtil.h

34 lines
976 B
C
Raw Normal View History

2016-12-02 23:33:29 -08:00
/*----------------------------------------------------------------------------*/
2017-08-25 17:48:06 -07:00
/* Copyright (c) 2016-2017 FIRST. All Rights Reserved. */
2016-12-02 23:33:29 -08:00
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
2017-08-25 17:48:06 -07:00
#ifndef CSCORE_JPEGUTIL_H_
#define CSCORE_JPEGUTIL_H_
2016-12-02 23:33:29 -08:00
2017-08-25 17:48:06 -07:00
#include <string>
#include <llvm/StringRef.h>
2016-12-02 23:33:29 -08:00
namespace wpi {
class raw_istream;
}
namespace cs {
bool IsJpeg(llvm::StringRef data);
bool GetJpegSize(llvm::StringRef data, int* width, int* height);
2017-08-25 17:48:06 -07:00
bool JpegNeedsDHT(const char* data, size_t* size, size_t* locSOF);
2016-12-02 23:33:29 -08:00
llvm::StringRef JpegGetDHT();
bool ReadJpeg(wpi::raw_istream& is, std::string& buf, int* width, int* height);
} // namespace cs
2017-08-25 17:48:06 -07:00
#endif // CSCORE_JPEGUTIL_H_