Reputation: 11
I've accidentally downloaded PNG images as ASCII files. The original files are already deleted so I have now only the downloaded files. Is it possible to fix PNG files corrupted by ASCII conversion?
Upvotes: 1
Views: 8551
Reputation: 323
Generally there are too many permutations, for example if 3974 bytes have been replaced it'll take 2^3974
attempts to work out the image. It's much better to look for a similar image online and do a fuzzy comparison pctf.
Upvotes: 0
Reputation: 75946
It depends. What kind of convertion was done? ( \r\n -> \n
? or the reverse?). If the image is really small, there is some probability of successful recovery but blindly doing the reverse convertion. See eg fixgz. Otherwise you should try all the alternatives, which can be a lot. The fact that PNG is structured in fixed length chunk can help, but it would take some work.
Upvotes: 2