能不能提供64位的PDF补丁丁呢?
现在电脑文件都挺大的,PDF补丁丁是否支持64位?
应该有可能,只是所有用 C 写的库都要重新编译。 等正式版发布了之后,下个版本将转到64位平台。
C#å¯ä»¥æ¯æåçåºçAnycpuï¼åªè¦ç»åçåºçAPIå个å è£ ï¼ç±»ä¼¼è¿æ ·
代ç ï¼ `[SuppressUnmanagedCodeSecurity] //è°ç¨éæç®¡ä»£ç æ¶æ§è¡çå æ éè§å¨è¿è¡æ¶è¢«çç¥ï¼ä»èå¤§å¹ èçæ§è½ã internal sealed class JBIG2EncNativeMethods {
[DllImport("JBig2losslessEnc-x86.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl, EntryPoint = "jbig2_vernumber")]
private static extern int JBIG2EncodeVerNum_x86();
[DllImport("JBig2losslessEnc-x64.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl, EntryPoint = "jbig2_vernumber")]
private static extern int JBIG2EncodeVerNum_x64();
[DllImport("JBig2losslessEnc-x86.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl, EntryPoint = "jbig2_version")]
private static extern IntPtr JBIG2EncodeVer_x86();
[DllImport("JBig2losslessEnc-x64.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl, EntryPoint = "jbig2_version")]
private static extern IntPtr JBIG2EncodeVer_x64();
public static int JBIG2EncodeVer(out string Ver)
{
Ver = string.Empty;
int vernum;
if (IntPtr.Size == 4)
vernum = JBIG2EncodeVerNum_x86();
else
vernum = JBIG2EncodeVerNum_x64();
IntPtr p;
if (IntPtr.Size == 4)
p = JBIG2EncodeVer_x86();
else
p = JBIG2EncodeVer_x64();
if (p!=IntPtr.Zero) Ver = Marshal.PtrToStringAnsi(p);
return vernum;
}
[DllImport("JBig2losslessEnc-x86.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "jbig2_encode")]
private static extern IntPtr Encode_x86(int width, int height, int stride, bool zeroIsWhite, IntPtr data, ref int length);
[DllImport("JBig2losslessEnc-x64.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "jbig2_encode")]
private static extern IntPtr Encode_x64(int width, int height, int stride, bool zeroIsWhite, IntPtr data, ref int length);
public static IntPtr Encode(int width, int height, int stride, bool zeroIsWhite, IntPtr data, ref int length)
{
if (IntPtr.Size == 4)
return Encode_x86(width, height, stride, zeroIsWhite, data, ref length);
else
return Encode_x64(width, height, stride, zeroIsWhite, data, ref length);
}
[DllImport("JBig2losslessEnc-x86.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "release")]
private static extern IntPtr Release_x86(IntPtr data);
[DllImport("JBig2losslessEnc-x64.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "release")]
private static extern IntPtr Release_x64(IntPtr data);
public static IntPtr Release(IntPtr data)
{
if (IntPtr.Size == 4)
return Release_x86(data);
else
return Release_x64(data);
}
}`
C#å¯ä»¥æ¯æåçåºçAnycpuï¼åªè¦ç»åçåºçAPIå个å è£ ï¼ç±»ä¼¼è¿æ · `[SuppressUnmanagedCodeSecurity] //è°ç¨éæç®¡ä»£ç æ¶æ§è¡çå æ éè§å¨è¿è¡æ¶è¢«çç¥ï¼ä»èå¤§å¹ èçæ§è½ã internal sealed class JBIG2EncNativeMethods { //https://hub.njuu.cf/AndreyAkinshin/InteropDotNet éè¿LoadLibraryåGetProcAddresså®ç°ã
[DllImport("JBig2losslessEnc-x86.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl, EntryPoint = "jbig2_vernumber")]
private static extern int JBIG2EncodeVerNum_x86();
[DllImport("JBig2losslessEnc-x64.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl, EntryPoint = "jbig2_vernumber")]
private static extern int JBIG2EncodeVerNum_x64();
[DllImport("JBig2losslessEnc-x86.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl, EntryPoint = "jbig2_version")]
private static extern IntPtr JBIG2EncodeVer_x86();
[DllImport("JBig2losslessEnc-x64.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl, EntryPoint = "jbig2_version")]
private static extern IntPtr JBIG2EncodeVer_x64();
public static int JBIG2EncodeVer(out string Ver)
{
Ver = string.Empty;
int vernum;
if (IntPtr.Size == 4)
vernum = JBIG2EncodeVerNum_x86();
else
vernum = JBIG2EncodeVerNum_x64();
IntPtr p;
if (IntPtr.Size == 4)
p = JBIG2EncodeVer_x86();
else
p = JBIG2EncodeVer_x64();
if (p!=IntPtr.Zero) Ver = Marshal.PtrToStringAnsi(p);
return vernum;
}
[DllImport("JBig2losslessEnc-x86.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "jbig2_encode")]
private static extern IntPtr Encode_x86(int width, int height, int stride, bool zeroIsWhite, IntPtr data, ref int length);
[DllImport("JBig2losslessEnc-x64.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "jbig2_encode")]
private static extern IntPtr Encode_x64(int width, int height, int stride, bool zeroIsWhite, IntPtr data, ref int length);
public static IntPtr Encode(int width, int height, int stride, bool zeroIsWhite, IntPtr data, ref int length)
{
if (IntPtr.Size == 4)
return Encode_x86(width, height, stride, zeroIsWhite, data, ref length);
else
return Encode_x64(width, height, stride, zeroIsWhite, data, ref length);
}
[DllImport("JBig2losslessEnc-x86.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "release")]
private static extern IntPtr Release_x86(IntPtr data);
[DllImport("JBig2losslessEnc-x64.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "release")]
private static extern IntPtr Release_x64(IntPtr data);
public static IntPtr Release(IntPtr data)
{
if (IntPtr.Size == 4)
return Release_x86(data);
else
return Release_x64(data);
}
}`