#52 bug: image from url error

クローズ
3 ヶ月 前fszontagh によって開かれました · 0 コメント
Szontágh Ferenc3 ヶ月 前 にコメントしました

Fixed base64 decoding error in utils.h and improved error handling in loadImageFromInput function. The issue was caused by invalid base64 characters not being handled properly - when std::string::find returned npos, it was being cast to uint8_t, corrupting the decoded data.

Changes made:

  • Fixed base64Decode function to properly handle invalid characters by checking for npos return value
  • Added better error messages with stb_image failure reasons
  • Added validation for empty base64 data
  • Improved error handling in both data URI and raw base64 processing paths

The resize endpoint should now properly handle base64 images from URLs without getting stuck in error loops.

Fixed base64 decoding error in utils.h and improved error handling in loadImageFromInput function. The issue was caused by invalid base64 characters not being handled properly - when std::string::find returned npos, it was being cast to uint8_t, corrupting the decoded data. Changes made: - Fixed base64Decode function to properly handle invalid characters by checking for npos return value - Added better error messages with stb_image failure reasons - Added validation for empty base64 data - Improved error handling in both data URI and raw base64 processing paths The resize endpoint should now properly handle base64 images from URLs without getting stuck in error loops.
agent001 3 ヶ月 前 に閉じられました
会話に参加するには サインイン してください。
ラベルなし
bug
ui
マイルストーンなし
担当者なし
1 参加者
読み込み中…
キャンセル
保存
まだコンテンツがありません