推 nh60211as: Mat rawImage = Mat(...) 才對09/29 16:45
→ hope2801: 收到09/29 16:49
→ hope2801: 非常謝謝您的幫忙,幫忙我解決了一部份的問題09/29 17:18
→ hope2801: 但是我現在遇到了我沒看過的問題09/29 17:18
→ hope2801: 0x00007FFCEAA14F99 中 (於 showphoto.exe) 發生未處理09/29 17:19
→ hope2801: 的例外狀況: Microsoft C++ 發生例外狀況: std::bad_a09/29 17:19
→ hope2801: rray_new_length (記憶體位置 0x000000982CF5F7F0)。09/29 17:19
→ hope2801: 這是在throw_bad_alloc.cpp檔裡09/29 17:20
→ hope2801: #else // ^^^ Managed ^^^ // vvv Native vvv //09/29 17:20
→ hope2801: __declspec(noreturn) void __CRTDECL __scrt_thr09/29 17:20
→ hope2801: ow_std_bad_alloc()09/29 17:20
→ hope2801: {09/29 17:20
→ hope2801: throw std::bad_alloc{};09/29 17:20
→ hope2801: }09/29 17:20
→ hope2801: __declspec(noreturn) void __CRTDECL __scrt_thr09/29 17:20
→ hope2801: ow_std_bad_array_new_length()09/29 17:20
→ hope2801: {09/29 17:20
→ hope2801: throw std::bad_array_new_length{};09/29 17:20
→ hope2801: }09/29 17:20
→ hope2801: #endif09/29 17:20
→ hope2801: 請問一下這個bug是什麼問題?09/29 17:22
→ hope2801: char* buffer = new char[length];09/29 17:36
→ hope2801: 我是此行程式有問題,可是我看不出來我錯在哪裡09/29 17:36
→ nh60211as: 你tellg()回傳值是啥?感覺你這程式碼還會有很多問題09/29 17:57
→ hope2801: 我的tellg()回傳25970-1給length09/29 18:08
→ hope2801: 我的raw圖是一個大小為256x256的深度為8的灰階圖09/29 18:08
→ nh60211as: 這什麼數字啊,我看不太懂09/29 18:29
→ F04E: 只不過是show個raw檔需要動用到OpenCV??這年頭作業真好寫09/29 20:18
→ nh60211as: 我知道25970是什麼了,那是'er'多字元字元的數值09/29 20:24
→ nh60211as: tellg()回傳的是-1,代表你讀檔根本就失敗了09/29 20:28
※ 編輯: hope2801 (27.246.37.129 臺灣), 10/04/2021 21:41:28