I have worked on the code for 6 hour and finally on checking manually these codes are working fine. I have tried both small and large bmp from 1 to 6. It worked. But same is not working in check50.

Edit(1) : As per xxd code of file from staff solution and mine, there is a deference of $ sign on third line. What s that. i.e Mine : 0000020: 0000 2400 0000 120b 0000 120b 0000 0000 ..$............. and staff's 0000020: 0000 fc00 0000 120b 0000 120b 0000 0000 ................

Edit(2) : Code removed.

And this is the output:

$ check50 2016.resize.less bmp.h resize.c
:) resize.c and bmp.h exist
:) resize.c compiles
:) doesn't resize 1x1-pixel BMP when n is 1
:( resizes 1x1-pixel BMP to 2x2 correctly when n is 2
:( resizes 1x1-pixel BMP to 3x3 correctly when n is 3
:( resizes 1x1-pixel BMP to 4x4 correctly when n is 4
:( resizes 1x1-pixel BMP to 5x5 correctly when n is 5
:( resizes 2x2-pixel BMP to 4x4 correctly when n is 2

enter image description here


The specification says to determine what header fields need to be updated. There are fields in the headers other than biWidth and biHeight that must be modified when n != 1. I don't see any code to deal with them.

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .