Commit 66550280 authored by Kirill Sleptsov's avatar Kirill Sleptsov
Browse files

Update bmp.c

parent b876f0b1
No related merge requests found
Pipeline #120985 passed with stages
in 19 seconds
#include "bmp.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "bmp.h"
/* Функция освобождения памяти */
void free_image(image_t *img) {
......@@ -27,7 +28,7 @@ enum read_status from_bmp(FILE *in, image_t *img) {
size_t padding = (4 - (img->width * sizeof(pixel_t)) % 4) % 4;
for (size_t y = 0; y < img->height; y++) {
fread(img->data + y * img->width, sizeof(pixel_t), img->width, in);
fseek(in, padding, SEEK_CUR);
fseek(in, (long)padding, SEEK_CUR);
}
return READ_OK;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment