Disabled BMP for now

This commit is contained in:
2026-04-16 16:34:27 +10:00
parent 8bb4f49b09
commit 7cb0b3930e

View File

@@ -315,8 +315,8 @@ namespace ANSCENTER
std::string CompressJpegToString(const cv::Mat& image, int quality) {
// Try GPU path first (returns "" if non-NVIDIA, pool full, or encode fails)
std::string result = NvJpegPool::Instance().tryCompress(image, quality);
if (!result.empty()) return result;
//std::string result = NvJpegPool::Instance().tryCompress(image, quality);
//if (!result.empty()) return result;
// CPU fallback — always available
static thread_local TurboJpegCompressor compressor;
@@ -6582,6 +6582,8 @@ struct BmpInfoHeader {
#pragma pack(pop)
extern "C" __declspec(dllexport) int ANSCV_ImageToBmp(cv::Mat** imageIn, int maxWidth, int& newWidth, int& newHeight, LStrHandle outputImage) {
return ANSCV_GetImage_S(imageIn,maxWidth,80,newWidth,newHeight,outputImage);
try {
if (!imageIn || !(*imageIn) || (*imageIn)->empty() || !outputImage) {
ANS_DBG("ANSCV", "ImageToBmp: invalid input");