public static ModuleDefinition ReadModule(Stream stream, ReaderParameters parameters) { ModuleDefinition.CheckStream(stream); if (!stream.CanRead || !stream.CanSeek) { throw new ArgumentException(); } Mixin.CheckParameters(parameters); return(ModuleReader.CreateModuleFrom(ImageReader.ReadImageFrom(stream), parameters)); }
public void Write(Stream stream, WriterParameters parameters) { ModuleDefinition.CheckStream(stream); if (!stream.CanWrite || !stream.CanSeek) { throw new ArgumentException(); } Mixin.CheckParameters(parameters); ModuleWriter.WriteModuleTo(this, stream, parameters); }