@@ -137,8 +137,8 @@ void PikaCV_Image_read(PikaObj* self, char* path) {
137137 PikaCV_Image_loadJpeg (self , data_arg );
138138 } else {
139139 obj_setErrorCode (self , PIKA_RES_ERR_OPERATION_FAILED );
140- __platform_printf ( "PikaCV_Image_read: unsupported format: %s\n " ,
141- suffix );
140+ obj_setSysOut ( self , "PikaCV_Image_read: unsupported format: %s" ,
141+ suffix );
142142 }
143143 arg_deinit (data_arg );
144144 strsDeinit (& buffs );
@@ -162,8 +162,8 @@ void PikaCV_Image_setPixel(PikaObj* self,
162162 data [y * image -> width + x ] = value ;
163163 } else {
164164 obj_setErrorCode (self , PIKA_RES_ERR_OPERATION_FAILED );
165- __platform_printf ( "PikaCV_Image_setPixel: unsupported format: %d\n " ,
166- image -> format );
165+ obj_setSysOut ( self , "PikaCV_Image_setPixel: unsupported format: %d" ,
166+ image -> format );
167167 }
168168}
169169
@@ -181,8 +181,8 @@ int PikaCV_Image_getPixel(PikaObj* self, int channel, int x, int y) {
181181 return data [y * image -> width + x ];
182182 } else {
183183 obj_setErrorCode (self , PIKA_RES_ERR_OPERATION_FAILED );
184- __platform_printf ( "PikaCV_Image_getPixel: unsupported format: %d\n " ,
185- image -> format );
184+ obj_setSysOut ( self , "PikaCV_Image_getPixel: unsupported format: %d" ,
185+ image -> format );
186186 }
187187 return 0 ;
188188}
@@ -208,14 +208,14 @@ void PikaCV_Image_write(PikaObj* self, char* path) {
208208 int size = _image_getDataSize (self );
209209 if (NULL == data || size <= 0 ) {
210210 obj_setErrorCode (self , PIKA_RES_ERR_OPERATION_FAILED );
211- __platform_printf ( "PikaCV_Image_write: data is NULL or size is 0\n " );
211+ obj_setSysOut ( self , "PikaCV_Image_write: data is NULL or size is 0" );
212212 return ;
213213 }
214214 FILE * fp = __platform_fopen (path , "wb+" );
215215 if (NULL == fp ) {
216216 obj_setErrorCode (self , PIKA_RES_ERR_OPERATION_FAILED );
217- __platform_printf ( "PikaCV_Image_write: failed to open file: %s\n " ,
218- path );
217+ obj_setSysOut ( self , "PikaCV_Image_write: failed to open file: %s" ,
218+ path );
219219 return ;
220220 }
221221 __platform_fwrite (data , 1 , size , fp );
@@ -234,12 +234,12 @@ void PikaCV_Image_add(PikaObj* self, PikaObj* image) {
234234 }
235235 if (!PikaCV_Format_CheckTwo (self , image , PikaCV_Check_ReturnError )) {
236236 obj_setErrorCode (self , PIKA_RES_ERR_OPERATION_FAILED );
237- __platform_printf ( "unsupported image format\n " );
237+ obj_setSysOut ( self , "unsupported image format" );
238238 return ;
239239 }
240240 if (!PikaCV_Size_Check (self , image , PikaCV_Check_SHW )) {
241241 obj_setErrorCode (self , PIKA_RES_ERR_OPERATION_FAILED );
242- __platform_printf ( "illegal image size\n " );
242+ obj_setSysOut ( self , "illegal image size" );
243243 return ;
244244 }
245245
@@ -278,12 +278,12 @@ void PikaCV_Image_minus(PikaObj* self, PikaObj* image) {
278278 }
279279 if (!PikaCV_Format_CheckTwo (self , image , PikaCV_Check_ReturnError )) {
280280 obj_setErrorCode (self , PIKA_RES_ERR_OPERATION_FAILED );
281- __platform_printf ( "unsupported image format\n " );
281+ obj_setSysOut ( self , "unsupported image format" );
282282 return ;
283283 }
284284 if (!PikaCV_Size_Check (self , image , PikaCV_Check_SHW )) {
285285 obj_setErrorCode (self , PIKA_RES_ERR_OPERATION_FAILED );
286- __platform_printf ( "illegal image size\n " );
286+ obj_setSysOut ( self , "illegal image size" );
287287 return ;
288288 }
289289
@@ -327,7 +327,7 @@ void PikaCV_Image_merge(PikaObj* self, PikaObj* B, PikaObj* G, PikaObj* R) {
327327 if (!PikaCV_Format_Check (self , PikaCV_ImageFormat_Type_RGB888 ,
328328 PikaCV_Check_ReturnError )) {
329329 obj_setErrorCode (self , PIKA_RES_ERR_OPERATION_FAILED );
330- __platform_printf ( "unsupported image format\n " );
330+ obj_setSysOut ( self , "unsupported image format" );
331331 return ;
332332 }
333333 if (!PikaCV_Format_Check (B , PikaCV_ImageFormat_Type_GRAY ,
@@ -337,13 +337,13 @@ void PikaCV_Image_merge(PikaObj* self, PikaObj* B, PikaObj* G, PikaObj* R) {
337337 !PikaCV_Format_Check (R , PikaCV_ImageFormat_Type_GRAY ,
338338 PikaCV_Check_ReturnError )) {
339339 obj_setErrorCode (self , PIKA_RES_ERR_OPERATION_FAILED );
340- __platform_printf ( "unsupported image format\n " );
340+ obj_setSysOut ( self , "unsupported image format" );
341341 return ;
342342 }
343343 if (!PikaCV_Size_Check (B , G , PikaCV_Check_SHW ) ||
344344 !PikaCV_Size_Check (B , R , PikaCV_Check_SHW )) {
345345 obj_setErrorCode (self , PIKA_RES_ERR_OPERATION_FAILED );
346- __platform_printf ( "illegal image size\n " );
346+ obj_setSysOut ( self , "illegal image size" );
347347 return ;
348348 }
349349
@@ -378,7 +378,7 @@ PikaObj* PikaCV_Image_split(PikaObj* self) {
378378 if (!PikaCV_Format_Check (self , PikaCV_ImageFormat_Type_RGB888 ,
379379 PikaCV_Check_ReturnError )) {
380380 obj_setErrorCode (self , PIKA_RES_ERR_OPERATION_FAILED );
381- __platform_printf ( "unsupported image format\n " );
381+ obj_setSysOut ( self , "unsupported image format" );
382382 return NULL ;
383383 }
384384
0 commit comments