Hot answers tagged

1

"The code seemingly blurs images without error" indicates a problem. "Seemingly" correct output is not exactly correct. It tells me that the actual digital data output needs to be checked byte by byte. Checking the image to see if it seems wrong (not so much right) is a useful tool, but close isn't good enough. That's why it's ...


1

Program is not producing any jpgs because it is reading itself. Recall from the lecture the first element in argv is the program's name, so the problem is here. FILE *card = fopen(argv[0],"r"); From the spec: Thanks to FAT, you can trust that JPEGs’ signatures will be “block-aligned.” That is, you need only look for those signatures in a block’s ...


1

It's a subtle but critical error. The problem lies here; int buffer[512]; ... for(int i = 0; i < 512; i++) { fread(&buffer[i], 1, 1, raw); } Here's what's happening. The fread() call reads exactly one byte and stores it in one element of the buffer[] array. But, each element in the array is 4 bytes long! The remaining bytes are ...


1

The IDE isn't able to recognize the card.raw file as something that can be opened as any particular file type. When I double-click on it, the IDE hangs, as you experienced. My browser didn't crash (Firefox), it gave me a popup error message after it timed out. Yours may have actually crashed, I can't explain that. However, if you right click on the file ...


Only top voted, non community-wiki answers of a minimum length are eligible