Save Raw Image Data As Image

file formatimages

So, being the curious person that I am, I opened a PNG image in Notepad. I got this:

‰PNG


IHDR         ‰
   sRGB ®Îé   gAMA  ±üa     pHYs  à  ÃÇo¨d  ÜIDAT8O­UMH[AþÞ‹Lý9•`¬bÞ9ääÁ›¥Jë¡ÁS©Äj«=‰Š’„@‰•x‘¢·„\<hÔ½hAŒ6øƒ ¤&Yš^^ÚC;ðØ·óÍ|3»3»+AEµwwwÏ‹ŠŠ^¤Ói³$IOiÔÒxI㹬^\\,¶µµÅ•î’R±½½ÍDr6ªËÑ?>>~jnnvçÚe '''厎}¤//P!rÊØu}}ý®µµõ'Ûdwwwí²,¿ÿKVª0‘:›šš²„{{{¯)©ÅÓÓSÌÏÏãááuuuÉ#ñù|Ðjµ˜žžFYYˆô
‘~•766žÇgö2H¥Rðûýp»Ý‚\)kkk˜™™A0„Édd"3IúÂ\rUUUM¬älfggÑØØ(Œ\.Ö×׳œ;;;˜ššóöövˆUfD/¸Âá°4]¹m2zzzF¡ÓéD¶¥¥¥èîîÆíí-ZZZ°°°€ââbå–™0JÚgJ„z½½½ ~[QRR‚ããcÔÖÖÂëõ¢²²R­@L˜ D«†nnn¢¯¯Ôo.//ÇÒÒjjjÔÌ…ŽK¨JÆàÉÉI–Œç÷÷÷Øßß/H–!¼T³à*Úl6uvvÂh4rk`bb‘H¤éwÎЯD9‹ÑÑQ‘Ùl$N§H$S‘0~ËÎÎÎ044$¹v»ÕÕÕp8âÿææV«UL!«r,[¦¥ü` £¿¿WWW¢]8+.DF¸]ÆÇÇÅôèè###H&“øœ¹4'I•ŒQs¿ÜÚÚ…¨¯¯ÇØØòVÅ:‡€³å#ª×ëyßZ,–п²'eeåã9Š”þc_(Àß×—5£Î»÷B¡Ð+ZÊÜ?_°¹O€%ó
÷l˜¾‚OÀ//ChæèE    IEND®B`‚

I was perusing Skype's database file when i came across a similar chunk of stuff:

    ‰PNG


IHDR   B   ,   Ѫn   tEXtSoftware Adobe ImageReadyqÉe<  ÍIDATxÚìZilTU>3¥ÓuXJÄŽ”¸Ä¥…é:Õ_ÄÀ`¢ )ü hŒ-þ©‰ ˜ ˜`B]0ÈP5è,ÅàBT¤XAQè”Ú*Ò23µNçÍò<çÎ{íé{ÓyC;´Ø“œy·÷m÷~÷,ß¹¯:QaB ôL 1„’èRºËé)cÇÊI§Ò1ÈtÄ1F ø»Õ*õxQ·  uÿ œž
ü=¦rÖŽ`Ôg ´Äˆêçv÷aÐp­-Á¹Â´µcÞr<äˆvëQé6»U3cEjŸši´! ÍØ~õ£´§OGiH_Å#õàK“5”–N5ØŽ<
§ÏY¸z¶év_@ÝŽ:3m@œê

ékêC0Ùi²†­Ï™YãÑ)8´$.,Ï]°ýÎÌÚ™};v7Ð5¨ËP‹F%kdâýÂË=”
VãàmëÎöAoHlëZi3šY­¡ ›-¡
kF†Ê¨Ov†àøµ [—/®¾H˜ÖJ:}µ›.CýÕŸRŒ@^ÂC¹ýŒ
³¢†ÔÚ‘O¯Mƒ5lª½7S„‚fÒ²i¦²„EÈ@PJ
½‘’îˆ`Ÿû¸=H€ì•2a8BEi²*®·9ĺQ…ÀéÉÁßvïÊüü|cìëÿB3ZÀgh  ´0›ç™áEÔ\ƒúÔÜ\õ¯ý°·%°-bcb‹pzÈfˆD•¢¥.œjÒõt   ±äfŠIWy#Ê8[%ýJ§u¡plšk côGD¨½€ŽþsÕÃ@¯"»þÀ> [ç›)ˆ+
¹‚àÆæk‰ƒ¥ÓC«îA=HƒyÂÅY¹|æ ö»‹³ò8.Q&™›ŸQ3BÖ0™É¹Ñ÷¢ßÃçÿaÅ7>¸âÃ#4ßZdaîŠv.´À‡
 5Ùï
Ða=ê5e È
œžƒjLñ½«Tß“9H5±M}ªL4ú¬›•·—O7-ÈÍ€­¸Ò?ûac“ÖÁ<€Üâý6šÿ
³X±¡È/œ÷+>-Žvcó¨rúŒºB£dŠBþ([‚lrŸšI %_^‹zà•‹~ö¾¿pµ·ýÒ-˜f[ô,Xn@pBhï¸ÅÃCǶ¿…-Ü6eáôØ$lñªúî̘v`Y;ǛѩSp Y–M5t*‚Z«[ÌÃß٨ƸÚ׃ñ©3@šCqž¾½?¦ˆEù,. pðò]f؇«ÿ{ï ‹œÀþ‹=áؼ8HVÝaÇœX6Y‡&hÃR€¢vÌŒñÚ§LyŠ–AïÐÆ›qî2YÆús~æ2yÊ‘¦›uŒø­ý±Î¸CPƒ‹…©Ÿ]ßÐÉ,¤A™P9=nAÕŽ"    ñJ%û©$-‚ÆÖ‚ú*êw˜êÜH¬,Ø~†jÔ\ùRâ³ÐMhÎw‡cs°$‹yIcœõ†—`×Ùø¢‹€¸ÛØ;Œš$²YÀÔKò€¹ºƒ(4Z0ÜË0íÃÎb8~ê#P—¢¶Åq«ö,)£«$*ߟE
 `—TÊg”xKB!îSÕ̲H
Ÿ2S.ºFXÊø†rìxõ‡aöhROHĨ“ø–I¯Ì()“ ’Ž) ø/%@ŠÉA’¸_ž1çºFˆˆTPu¿ ¸aŽáÃ)íPÉÙA
á&)(aʶ\F¬ÜV ²”·?ÐðAºžÝƒÙu>&c³!¹Ò×)qnY®*W§*”¾<_zº70¢YÅé9Ç¥ò]Té'³Õ¦ —¥ã÷#¾1#[M”+ÁÙ¤ãIQJãø‘1G‚ÉŽ˜hbÇoýràâÃÐm^(õí‘xÅ`9¯ÌgÒ²1œG(ÅÞä)6𱂮¥{†q‹VL‰Eq¥~¡„†~6°£EÔ6ª1‚ÊÚÆÇrb€àÍ¿
k
ª-Hî?ÙÃÀ PVÍ0Æ€£„,•“¼ 2‰ÚÃí ³úp”†<  àAˆ7ýR.S”M3Lœ\GÞÊÓ,Q`–ÞŠžôˆ›¼±+̧L²>ŽIrrúŽAo-
Åêw­Ècíñ&š¾tÑ„ãÉ“$yÎd†|Ȩf\ãÚ"´H "úœîë@ÈÜ>Ù¤{ÃSvt_zY©M{Ñgò|¡~¬º†]ŠØt;=6·ÖoÁÒ5ß íÓ}D¹âOâžYÏhrtËß‹}Mcˆÿà±çr ÕçZRcÝm‘5nw™ "
@Ü7Äàf˸‘ÿ 3Ét}Xå    IEND®B`‚

They look similar enough – and most importantly, both start with ‰PNG. So, i tried putting it into notepad and saving it as a PNG file. (with ANSI encoding, fyi.)
When i tried to open it – nada. File Corrupted, says Windows. So, my question: how to i get that rawness whatever into an actual image? is it not ANSI encoding? or is there a program that will do this for me?

Best Answer

  • Notepad will often corrupt binary files, as it is only intended to edit text files. Just open and save a good PNG file and you will afterward find it unreadable (messing with CR and LF characters, stopping at the first null byte, etc.). You may be interested in a hex editor. I have Frhed on my computer, but there are many alternatives. And you might want to read about the PNG file format so that you know, for example, where the beginning and end of the file are.

    Did you know that automatic "file carving" programs exist? One such program is PhotoRec. You can drag your database file to that program and have it look for all the PNG files for you. The next step would be to run it on an old hard drive to find deleted files, which are only removed from the operating system's list of files and not actually erased until other files take their place. Your luck depends on how fragmented the files are, but it is likely you will find a lot (including cached web pages and old virus infections).

    That, by the way, is why you should always not merely reformat but completely overwrite or destroy a computer's hard drive before disposing of it.

  • Related Question