diff options
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -17,8 +17,7 @@ pgm_save(unsigned char *buf, int wrap, int xsize, int ysize, char *filename) } void -frame_mix_pgm_save(struct video_frame *frame_a, struct video_frame *frame_b, - char *filename) +frame_mix(struct video_frame *frame_a, struct video_frame *frame_b) { uint8_t *row_a = frame_a->data, *col_a = NULL; uint8_t *row_b = frame_b->data, *col_b = NULL; @@ -35,10 +34,4 @@ frame_mix_pgm_save(struct video_frame *frame_a, struct video_frame *frame_b, row_a += frame_a->stride; row_b += frame_b->stride; } - - FILE *f = fopen(filename, "w"); - fprintf(f, "P5\n%d %d\n%d\n", frame_a->width, frame_a->height, 255); - for (int i = 0; i < frame_a->height; i++) - fwrite(frame_a->data+i*frame_a->stride, 1, frame_a->width, f); - fclose(f); } |