Questions tagged [padding]

The tag has no usage guidance.

9 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
209 views

pset5: Resize does not consistently work

I am having a problem with resize. I can resize smiley.bmp perfectly at X1, X2, and X10, but not for factors between 2 and 10--I just get an abstract blob of colors. I assume this has something to do ...
1
vote
1answer
510 views

adding padding into resize

I know my paddingOld & paddingNew values are correct. I also know all my header info is correct (checked student vs staff) check 50 passes the cases that do not need padding, but fails the ones ...
0
votes
1answer
68 views

Pset4 - Resize problem with vertical scaling

int main(int argc, char *argv[]) { // ensure proper usage if (argc != 4) { fprintf(stderr, "Usage: ./copy infile outfile\n"); return 1; } // remember filenames int n = ...
0
votes
1answer
117 views

bfSize different colors resize pset4

I just cannot stop getting funky different colors when I resize, and I see it must be some padding issue. I used the specs and peek to compare my file student.bmp with the staff.bmp. It shows in red ...
0
votes
2answers
59 views

pset4 padding calculation last %

In pset4, whodunit, copy.c padding is calculated: int padding = (4 - (bi.biWidth * sizeof(RGBTRIPLE)) % 4) % 4; I cannot understand the use of last % 4. Could following statement have the same ...
0
votes
2answers
132 views

pset4 Resize - black bars of padding?(not sure how to get rid of them)

First time on this so be gentle. I have been at a standstill on this for hours. Below is my code and I can't seem to find out why these black bars(padding)show up. Any help? #include <stdio.h> #...
0
votes
1answer
117 views

pset 4, resize.c is not working

Here is the code for resize.c I am stuck for quite some time now and i am not able to figure out where i am wrong. please help. bi.biHeight = height*n; bi.biWidth = width*n; // determine new padding ...
0
votes
0answers
317 views

PSET4 Resize Works for Smiley but not Small

Hi I can get Resize to work fine for Smiley for all sizes, but I can't get ANY sizes to work for Small. Please help! I think the problem has to do with the padding, but not sure why it would work ...
0
votes
1answer
663 views

Not sure why resize.c isn't working

resize.c compiles and runs, but produces an image with a lot of black space. A fresh set of eyes on my code is welcome to see where I have gone wrong. I assume it has to do with padding but I can't ...