Рогачев Михаил P32082
6 unresolved threads
Update solution/src/bmp.c, solution/src/image.c, solution/src/main.c, solution/include/bmp.h, solution/include/image.h, solution/include/transform.h files
19 .biSize = 40, 20 .biWidth = img->width, 21 .biHeight = img->height, 22 .biPlanes = 1, 23 .biBitCount = 24, 24 .biCompression = 0, 25 .biSizeImage = (sizeof(pixel) * img->width + calculate_padding(img->width)) * img->height, 26 .biXPelsPerMeter = 0, 27 .biYPelsPerMeter = 0, 28 .biClrUsed = 0, 29 .biClrImportant = 0 30 }; 31 } 32 33 enum read_status from_bmp(FILE* in, image* img){ 34 struct bmp_header header = {0}; - Last updated by Mihail Rogachev
1 1 #include <stdio.h> 2 #include <stdlib.h> 2 3 3 int main( int argc, char** argv ) { 4 (void) argc; (void) argv; // supress 'unused parameters' warning 4 #include "../include/bmp.h" 5 #include "../include/transform.h" 6 7 int main(int argc, char* argv[]) { 8 9 if (argc != 3){ 10 fprintf(stderr, "Incorrect input!\n"); 11 return -1; changed this line in version 2 of the diff
- Last updated by Mihail Rogachev
1 #include <stdio.h> 2 3 #include "../include/bmp.h" 4 5 6 #ifndef BMP_C 7 #define BMP_C 8 9 uint8_t calculate_padding(uint64_t width){ 10 return (4 - (sizeof(pixel) * width)) % 4; 11 } 12 13 struct bmp_header generate_BMPheader(image const* img){ 14 return (struct bmp_header) { 15 .bfType = 0x4D42, changed this line in version 2 of the diff
7 int main(int argc, char* argv[]) { 8 9 if (argc != 3){ 10 fprintf(stderr, "Incorrect input!\n"); 11 return -1; 12 } 13 14 FILE* input_file = fopen(argv[1], "rb"); 15 if (!input_file){ 16 fprintf(stderr, "Can't open input file!"); 17 return -1; 18 } 19 20 FILE* output_file = fopen(argv[2], "wb"); 21 if (!output_file){ 22 fprintf(stderr, "Can't open output file!"); - Last updated by Mihail Rogachev
1 #include <stdio.h> 2 3 #include "../include/bmp.h" 4 5 6 #ifndef BMP_C 7 #define BMP_C 8 9 uint8_t calculate_padding(uint64_t width){ changed this line in version 2 of the diff
ревью зачтено
@Mihail_Rogachev ждем фиксы
1 1 #include <stdio.h> 2 #include <stdlib.h> 2 3 3 int main( int argc, char** argv ) { 4 (void) argc; (void) argv; // supress 'unused parameters' warning 4 #include "../include/bmp.h" 5 #include "../include/transform.h" 6 7 int main(int argc, char* argv[]) { 8 9 if (argc != 3){ 10 fprintf(stderr, "Incorrect input!\n"); 11 return -1; 12 } 13 14 FILE* input_file = fopen(argv[1], "rb"); changed this line in version 2 of the diff
added 1 commit
- 67fcab23 - Update solution/src/bmp.c, solution/include/file_worker.h,...
added 1 commit
- cd1d3ca1 - Update solution/include/file_worker.h, solution/src/file_worker.c, solution/src/main.c files
added 1 commit
- d96bede0 - Update solution/include/file_worker.h, solution/src/file_worker.c, solution/src/bmp.c files
@andrew Исправлено