Implemented a ImageExtensions class providing a "ToStream" extension method.