PSD File Contents Analysis[Back] This is a page for PDF file analysis (Header). Try sample file: Try an exampleWhat are we looking for?For a PSD file, we look for the byte sequence 38 42 50 53 or the ASCII sequence of 8BPS Try your ownOr enter your own URL to analyse the first six sectors of the file: |
File contents analysis |
Sample code
public string getPsd(System.IO.Stream file) { string TextBox1 = ""; byte[] b = ReadFully(file, file.Length); TextBox1 += "Bytes 1-4 [Signature should be 8BPS]: " + (char)b[0] + (char)b[1] + (char)b[2] + (char)b[3]+ "<br/>"; TextBox1 += "Bytes 5,6 [Version should be 1]: " + Global.intToHex(b[4]) + Global.intToHex(b[5])+ "<br/>"; TextBox1 += "Bytes 7,8,9,10 [Reserved] <br/>"; TextBox1 += "Bytes 11,12 [Channels in image]: " + Global.intToHex(b[10]) + Global.intToHex(b[11])+ "<br/>"; TextBox1 += "Bytes 13,14,15,16 [Image height: " + Global.intToHex(b[12]) + Global.intToHex(b[13]) + Global.intToHex(b[14]) + Global.intToHex(b[15]) + "<br/>"; TextBox1 += "Bytes 17,18,19,20 [Image width: " + Global.intToHex(b[16]) + Global.intToHex(b[17]) + Global.intToHex(b[18]) + Global.intToHex(b[19]) + "<br/>"; TextBox1 += "Bytes 21,22 [Color depth]: " + Global.intToHex(b[20]) + Global.intToHex(b[21]) + "<br/>"; TextBox1 += "Bytes 23,24 [Color mode]: " + Global.intToHex(b[22]) + Global.intToHex(b[23]) + "<br/>"; return (TextBox1); }