private WriteHeader ( string header ) : void | ||
header | string | 文件头 |
Результат | void |
internal static void Encode(GifImage gifImage, string gifPath) { FileStream fs = null; try { fs = new FileStream(gifPath, FileMode.Create); StreamHelper streamHelper = new StreamHelper(fs); streamHelper.WriteHeader(gifImage.Header); streamHelper.WriteLSD(gifImage.LogicalScreenDescriptor); if (gifImage.LogicalScreenDescriptor.GlobalColorTableFlag) { streamHelper.SetGlobalColorTable(gifImage.GlobalColorTable); } streamHelper.SetApplicationExtensions(gifImage.ApplictionExtensions); streamHelper.SetCommentExtensions(gifImage.CommentExtensions); SetFrames(gifImage.Frames, streamHelper, fs); } catch { throw; } finally { if (fs != null) { fs.Close(); } } }
internal static void Encode(GifImage gifImage, string gifPath) { FileStream fs = null; try { fs = new FileStream(gifPath, FileMode.Create); StreamHelper streamHelper = new StreamHelper(fs); streamHelper.WriteHeader(gifImage.Header); streamHelper.WriteLSD(gifImage.LogicalScreenDescriptor); if (gifImage.LogicalScreenDescriptor.GlobalColorTableFlag) { streamHelper.SetGlobalColorTable(gifImage.GlobalColorTable); } streamHelper.SetApplicationExtensions(gifImage.ApplictionExtensions); streamHelper.SetCommentExtensions(gifImage.CommentExtensions); SetFrames(gifImage.Frames, streamHelper, fs); } catch { throw; } finally { if (fs != null) { fs.Close(); } } }