mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
parent
0413d4bbd2
commit
4767229a7c
@ -632,6 +632,7 @@ void imlib_save_image(image_t *img, const char *path, rectangle_t *roi, int qual
|
|||||||
FIL fp;
|
FIL fp;
|
||||||
file_write_open(&fp, path);
|
file_write_open(&fp, path);
|
||||||
write_data(&fp, img->pixels, img->w * img->h);
|
write_data(&fp, img->pixels, img->w * img->h);
|
||||||
|
file_close(&fp);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case FORMAT_JPG:
|
case FORMAT_JPG:
|
||||||
@ -648,6 +649,7 @@ void imlib_save_image(image_t *img, const char *path, rectangle_t *roi, int qual
|
|||||||
char *new_path = strcat(strcpy(fb_alloc(strlen(path)+5), path), ".raw");
|
char *new_path = strcat(strcpy(fb_alloc(strlen(path)+5), path), ".raw");
|
||||||
file_write_open(&fp, new_path);
|
file_write_open(&fp, new_path);
|
||||||
write_data(&fp, img->pixels, img->w * img->h);
|
write_data(&fp, img->pixels, img->w * img->h);
|
||||||
|
file_close(&fp);
|
||||||
fb_free();
|
fb_free();
|
||||||
} else { // RGB or GS, save as BMP.
|
} else { // RGB or GS, save as BMP.
|
||||||
char *new_path = strcat(strcpy(fb_alloc(strlen(path)+5), path), ".bmp");
|
char *new_path = strcat(strcpy(fb_alloc(strlen(path)+5), path), ".bmp");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user