Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 10971

recover.c, one of the assignments for Problem Set 4, will challenge you to search through the raw bytes of a camera's digital memory to recover a bunch of "deleted" JPEG images.

1 vote
2 answers
795 views

pset4 recover issue-blank pics?

I was wondering if anyone could give me some guidance on this problem. I have the below code. When it runs, I see 000.jpg to 049.jpg, however all the pictures are black boxes? I'm not quite sure what' …
LauraK10's user avatar
2 votes
Accepted

pset4 recover issue-blank pics?

Figured it out. I had to put the if (jpeg>=1) { fwrite(bytes, 512, 1, img); } into an else, so that it would only execute if it wasn't the beginning of the file.
LauraK10's user avatar