open (ImageFile,">$ImageName") or dienice ("Could not open $ImageName for writing."); binmode (ImageFile);