示例#1
0
 public static extern ReturnCode DsmWinNew(
     [In, Out] TWIdentity origin,
     [In, Out] TWIdentity destination,
     DataGroups dg,
     DataArgumentType dat,
     Message msg,
     [In, Out] TWJpegCompression data);
示例#2
0
文件: Dsm.cs 项目: lukaszmn/ntwain
 public static ReturnCode DsmEntry(
     TWIdentity origin,
     TWIdentity destination,
     Message msg,
     TWJpegCompression data)
 {
     if (PlatformInfo.Current.IsWindows)
     {
         if (PlatformInfo.Current.UseNewWinDSM)
         {
             return(NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.JpegCompression, msg, data));
         }
         else
         {
             return(NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.JpegCompression, msg, data));
         }
     }
     else if (PlatformInfo.Current.IsLinux)
     {
         return(NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.JpegCompression, msg, data));
     }
     throw new PlatformNotSupportedException();
 }
示例#3
0
 /// <summary>
 /// Allows the application to configure the compression parameters to be used on all future JPEGcompressed
 /// transfers during the current session. The application should have already
 /// established that the requested values are supported by the Source.
 /// </summary>
 /// <param name="compression">The compression.</param>
 /// <returns></returns>
 public ReturnCode Set(TWJpegCompression compression)
 {
     Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.JpegCompression, Message.Set);
     return(Dsm.DsmEntry(Session.AppId, Session.CurrentSource.Identity, Message.Set, compression));
 }
示例#4
0
 public ReturnCode GetDefault(out TWJpegCompression compression)
 {
     Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.JpegCompression, Message.GetDefault);
     compression = new TWJpegCompression();
     return(Dsm.DsmEntry(Session.AppId, Session.CurrentSource.Identity, Message.GetDefault, compression));
 }