Questions tagged [bitmap]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
737 views

Pset 4: Resize (more) — check50 all correct except one

The code I have written for resize checks out visually for all float values (0.0,100.0]. Also, check50 agrees that my code is functioning properly save for one specific case: :) resize.c and bmp.h ...
1
vote
1answer
242 views

How to resize vertically for pset4?

following the pseudocode to resize vertically - can you tell me if I'm on the right lines? Looks like too many nested for loops. // horizontal resize // for each row for (int i = 0; i <...
0
votes
1answer
45 views

Pset3-resize explaination

I am struggling to understand how to approach resize problem. I see there are alot of codes available for me to use directly. I do understand the problem, Zymal's pesudocode, but the lack of clarity ...
0
votes
1answer
95 views

How does RGBTRIPLE differentiate between the 3 bytes it reads from input file and assign them to rgbt blue, green and red?

sorry if the question is confusing, but i completed the whodunit problem in pset3 and my doubt was that in the following code: // iterate over pixels in scanline for (int j = 0; j < bi....
0
votes
1answer
51 views

Issues with padding - why am I getting a black image for every outfile?

See code below: /** * copy.c * * Computer Science 50 * Problem Set 4 * * Copies a BMP piece by piece, just because. */ #include <stdio.h> #include <stdlib.h> #include "bmp.h" int main(...
0
votes
1answer
58 views

Pset4: Resize: Unsupported image format

Why am I only getting unsupported image format when trying to resize clue.bmp. I have tried with small,large and smiley and these all seem to be working. The image is being resized correctly but the ...
0
votes
1answer
129 views

PSET4 Resize: image resizes but fails check50 (PADDING or HEADER???)

I thought I was confused before I had this "clarification": check50 gives confusing results for pset4 resize. Now I'm flat out lost. For this challenge I actually tried to use a function to hold all ...
0
votes
1answer
124 views

pset4 resize premature end of file encountered

This is extremely frustrating. I've been having header problems for a while, getting various error messages. However, using xxd I can see that when I run resize with n=2, biSizeImage is indeed 120, ...
0
votes
1answer
156 views

Pset4 Resize: Incorrect scaling of image

Once again I find myself stumped by CS50. In the below code I have done my best to try to mathematically edit the Bitmap Headers using a variable I named "scalefactor" which is determined by the user, ...
0
votes
1answer
87 views

Resize problem in pset4

I find that a bitmap which is been provided has following properties. {biSize = 40, biWidth = 3, biHeight = -3, biPlanes = 1, biBitCount = 24, biCompression = 0, biSizeImage = 36, biXPelsPerMeter = ...
0
votes
0answers
11 views

Pset4 - fread initializing struct

I have read this question/answer and this question/answer as well as BITMAPFILEHEADER structure and BITMAPINFOHEADER structure from MS, and I want to check if I am interpreting them properly. In ...
0
votes
0answers
74 views

Is resize.c/more functionality for n < 1 subjective?

I am having issues with getting my outfiles for n = 0.5 to match check50's. To scale a bitmap image down pixels must be removed, and the algorithm we're required to write is what will choose which ...
0
votes
2answers
366 views

Pset4 resize: Invalid or Unsupported Image Format

I have only written my code for the resize (more) problem up to the point where I rewrite the headers for the new outfile. At this point in my code, I only expect my code to work when I have an input ...
0
votes
1answer
125 views

Why does my output image look like this for pset4 resize?

Please see code below, I know my fseek is incorrect, as im offseting the size of RGBTRIPLE whereas I want to offset the size of the buffer. /** * copy.c * * Computer Science 50 * Problem Set ...
0
votes
0answers
74 views

Bitmap Header info

How could I see the bmp header/metadata info for the verdict.bmp file. Is there any command exist similar to 'peek large.bmp' ?