Exemplo n.º 1
0
 /* ----------------------------------------------------------------- */
 ///
 /// GetImagePage
 ///
 /// <summary>
 /// Gets a Page collection from the specified file.
 /// </summary>
 ///
 /// <param name="io">I/O object.</param>
 /// <param name="src">File path of the Image.</param>
 ///
 /// <returns>Page collection.</returns>
 ///
 /* ----------------------------------------------------------------- */
 public static IEnumerable <Page> GetImagePages(this FileSystem.IO io, string src)
 {
     using (var ss = io.OpenRead(src))
         using (var image = Image.FromStream(ss))
         {
             return(io.GetImagePages(src, image));
         }
 }
Exemplo n.º 2
0
 /* ----------------------------------------------------------------- */
 ///
 /// GetImagePage
 ///
 /// <summary>
 /// Gets a Page object from the specified file.
 /// </summary>
 ///
 /// <param name="io">I/O object.</param>
 /// <param name="src">File path of the Image.</param>
 /// <param name="index">Index of the Image.</param>
 ///
 /// <returns>Page object.</returns>
 ///
 /* ----------------------------------------------------------------- */
 public static Page GetImagePage(this FileSystem.IO io, string src, int index)
 {
     using (var ss = io.OpenRead(src))
         using (var image = Image.FromStream(ss))
         {
             return(io.GetImagePage(src, image, index));
         }
 }