Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Kirill Sleptsov
assignment-3-image-transform
Commits
66550280
Commit
66550280
authored
2 weeks ago
by
Kirill Sleptsov
Browse files
Options
Download
Email Patches
Plain Diff
Update bmp.c
parent
b876f0b1
master
No related merge requests found
Pipeline
#120985
passed with stages
in 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
solution/src/bmp.c
solution/src/bmp.c
+4
-3
No files found.
solution/src/bmp.c
View file @
66550280
#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
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help