Check50 doesn't accept absolutely identical files. Screenshot represents example where n equals to 5.

First I made new test file that contains only one pixel - dot.bmp. Next I resized that file with my code and with staff's code. Then I checked headers of both files. According to the picture they are the same. Next step is to compare files byte-by-byte. Again, according to the screenshot files are the same.

Still check50 doesn't accept my result when n is 5.

Don't know what to do. Any help is appreciated.


ps: sorry for my english.

1 Answer 1


There is a reason for testing with multiple data sets. You can have data that, when tested, hides problems with a program. When I look at your result, I notice that yes, you do test with a single pixel. That means that every pixel in the result file will be the same. It would then be easy for code that isn't right to print the correct number of pixels, but do it wrong and still produce a correct result.

IF you had tested with a source file having multiple pixels that are different, it is much more likely that you would see any errors that would be hidden by scaling a single pixel file. I suspect that this is exactly what has happened. check50 tests with different files for this reason.

You also need to test with source files with different size padding.

Try rerunning your code with the small.bmp file and the smiley face bitmap file. I'm sure that you will immediately see your problems.

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

  • 1
    Thank you very much, Cliff B. Use of small.bmp eventually revealed the problem. It was bi.biHeight. A piece of advice for people which will meet resembling problem - don't forget that bi.biHeight is a negative number. Oct 28, 2015 at 16:03

You must log in to answer this question.

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