How to open unknow image format from BLOB stream in Delphi

If you have databse Blob file containing image but you don’t know how to open this , here is codeĀ :

This tested with delphi 2007..XE5