Pashchenko Oleg P32141
6 unresolved threads
- Last updated by Oleg Pashchenko
3 #include "bmp_worker.h" 4 #include "image_struct.h" 5 #include "padding_worker.h" 6 #include <malloc.h> 7 #include <stdio.h> 8 9 #define ALLOWED_BI_BIT_COUNT 24 10 11 enum status to_bmp(FILE *out, struct image const *image) { 12 struct bmp *b_header = bmp_construct(image); 13 uint64_t status = fwrite(b_header, sizeof(struct bmp), 1, out); 14 free(b_header); 15 16 int pixel_counter = 0; 17 if (!status) { 18 printf("WRITE_ERROR_YA_EBANУТЫЙ"); changed this line in version 2 of the diff
- Last updated by Oleg Pashchenko
11 enum status to_bmp(FILE *out, struct image const *image) { 12 struct bmp *b_header = bmp_construct(image); 13 uint64_t status = fwrite(b_header, sizeof(struct bmp), 1, out); 14 free(b_header); 15 16 int pixel_counter = 0; 17 if (!status) { 18 printf("WRITE_ERROR_YA_EBANУТЫЙ"); 19 return WRITE_ERROR; 20 } 21 for (size_t i = 0; i < image->height; i++) { 22 for (size_t j = 0; j < image->width; j++) { 23 status = fwrite(image->data + pixel_counter, sizeof(struct pixel), 1, out); 24 if (!status) { 25 26 printf("WRITE_ERROR_YA_EBANУТЫЙ"); changed this line in version 2 of the diff
- Last updated by Oleg Pashchenko
15 15 16 16 int pixel_counter = 0; 17 17 if (!status) { 18 printf("WRITE_ERROR_YA_EBANУТЫЙ"); 18 printf("WRITE_ERROR"); Не знаю чем я им не угодил. Вроде пиво вместе пили, хлеб один едим, а тут такое...
Edited by Oleg Pashchenko
- Last updated by Oleg Pashchenko
8 9 #define ALLOWED_BI_BIT_COUNT 24 10 11 enum status to_bmp(FILE *out, struct image const *image) { 12 struct bmp *b_header = bmp_construct(image); 13 uint64_t status = fwrite(b_header, sizeof(struct bmp), 1, out); 14 free(b_header); 15 16 int pixel_counter = 0; 17 if (!status) { 18 printf("WRITE_ERROR"); 19 return WRITE_ERROR; 20 } 21 for (size_t i = 0; i < image->height; i++) { 22 for (size_t j = 0; j < image->width; j++) { 23 status = fwrite(image->data + pixel_counter, sizeof(struct pixel), 1, out); changed this line in version 3 of the diff
- Last updated by Oleg Pashchenko
7 int main(int argc, char** argv) { 8 if (argc != 3) { 9 fprintf(stderr, "Error: Invalid number of arguments provided.\n"); 10 return 1; 11 } 12 13 FILE* file_input = fopen(argv[1], "rb"); 14 if (!file_input) { 15 fprintf(stderr, "Error: Could not open input file.\n"); 16 return 1; 17 } 18 struct image image_source = {0}; 19 // enum ReadStatus read_status = 20 from_bmp(file_input, &image_source); 21 fclose(file_input); 22 // if (read_status != READ_OK) { changed this line in version 3 of the diff
- Last updated by Oleg Pashchenko
1 #include "bmp_worker.h" 2 #include "image_struct.h" 3 #include "rotator.h" 4 #include <stdio.h> 5 #include <stdlib.h> 6 7 int main(int argc, char** argv) { 8 if (argc != 3) { 9 fprintf(stderr, "Error: Invalid number of arguments provided.\n"); changed this line in version 3 of the diff
@andrew review done