New answers tagged

2 votes

Image Processing Application in C

You have some great reviews of the C code, so I'll look at the compilation script: #!/bin/bash gcc improc.c main.c -O3 -g -Wall -Wpedantic -lm -Wextra -o main ...
Toby Speight's user avatar
4 votes

Image Processing Application in C

I second Cris Luengo's recommendations especially regarding API design. Additionally: Back in the day I wrote C, it was frowned upon to make a function that allocates space and does something, without ...
Zizy Archer's user avatar
4 votes

Image Processing Application in C

Everyone has pretty good answers here already. But I'd like to add - There's no concept of a negatively sized image, so consider use unsigned integer sizes, or ...
Kingsley's user avatar
  • 161
10 votes
Accepted

Image Processing Application in C

Let's talk about the API. I've worked with multiple imaging libraries over the past ~25 years, and have significant experience designing them too. API: Let's start with the image container, the core ...
Cris Luengo's user avatar
  • 5,178
5 votes

Image Processing Application in C

The other contributors made an excellent review of your code. I just want to comment on the philosophy or rationale behind this library choices. Let's talk about the aim of computing a Sobel's filter: ...
Costantino Grana's user avatar
11 votes

Image Processing Application in C

Size to the object, not type Rather than sizeof(Pixel), use sizeof image->pixels[0]. It is easier to code right, review and ...
chux - Reinstate Monica's user avatar
12 votes

Image Processing Application in C

Enable more compiler warnings: ...
Harith's user avatar
  • 2,302
1 vote
Accepted

Filter: BMP Image Filtering Tool - follow-up

Should the functions doing the input/output be moved to bmp.c? I recommend a different approach. Think of all these image processing code as a set of routines in a library, maybe called ...
chux - Reinstate Monica's user avatar

Top 50 recent answers are included