Ported to .Net AdobeHDS.php by K-S-V