comparison OSTC4Operations.cpp @ 6:fc91c3e09285 default tip

Bugfix OTSC 4/5 icon size check.
author Ideenmodellierer
date Sat, 03 Jan 2026 20:49:43 +0100
parents 115cfa4a3239
children
comparison
equal deleted inserted replaced
5:115cfa4a3239 6:fc91c3e09285
250 } 250 }
251 251
252 QByteArray bin = bmp->getTransferBytes(); 252 QByteArray bin = bmp->getTransferBytes();
253 bmp->getImageXY(&width, &height); 253 bmp->getImageXY(&width, &height);
254 254
255 if(bin.size() < 200000) 255 if(bin.size() < 0x20000 - 12) /* max bin size - header */
256 { 256 {
257 buf3offset[0] = 0x20; 257 buf3offset[0] = 0x20;
258 buf3offset[1] = 0x00; 258 buf3offset[1] = 0x00;
259 buf3offset[2] = 0x00; 259 buf3offset[2] = 0x00;
260 buf3offset[3] = 0x00; 260 buf3offset[3] = 0x00;
326 326
327 LOG_INFO(" icon uploaded."); 327 LOG_INFO(" icon uploaded.");
328 } 328 }
329 else 329 else
330 { 330 {
331 LOG_THROW("Image to large. Must be < 200k."); 331 LOG_THROW("Image to large. Must be < 128k.");
332 } 332 }
333 PROGRESS_RESET(); 333 PROGRESS_RESET();
334 } 334 }
335 335
336 336