Exemplo n.º 1
0
 public List <PageInfo> Convert(String fileName, ImageConversionOptions options)
 {
     // A file extension with a length greater than 10 will cause a buffer overflow
     // when opened with Clear Image, so load into a memory stream instead
     if (Path.GetExtension(fileName).Length > 10)
     {
         using (var ms = new MemoryStream(File.ReadAllBytes(fileName)))
         {
             return(QueueAndWait(new ImageProcessingArgs(ms, options)));
         }
     }
     else
     {
         return(QueueAndWait(new ImageProcessingArgs(fileName, options)));
     }
 }
Exemplo n.º 2
0
 public List <PageInfo> Convert(Bitmap bitmap, ImageConversionOptions options)
 {
     return(QueueAndWait(new ImageProcessingArgs(bitmap, options)));
 }
Exemplo n.º 3
0
 public List <PageInfo> Convert(Stream stream, ImageConversionOptions options)
 {
     return(QueueAndWait(new ImageProcessingArgs(stream, options)));
 }
Exemplo n.º 4
0
 public ImageProcessingArgs(Bitmap bitmap, ImageConversionOptions options)
     : this(options)
 {
     ImageData = bitmap;
     Operation = OperationType.Bitmap;
 }
Exemplo n.º 5
0
 public ImageProcessingArgs(Stream stream, ImageConversionOptions options)
     : this(options)
 {
     ImageData = stream;
     Operation = OperationType.Stream;
 }
Exemplo n.º 6
0
 public ImageProcessingArgs(String fileName, ImageConversionOptions options)
     : this(options)
 {
     ImageData = fileName;
     Operation = OperationType.File;
 }
Exemplo n.º 7
0
 private ImageProcessingArgs(ImageConversionOptions options)
 {
     Pages     = new List <PageInfo>();
     Options   = options;
     SyncEvent = new ManualResetEvent(false);
 }