public string GetAttribute(string name)
{
using (INativeInstance nameNative = UTF8Marshaler.CreateInstance(name))
{
IntPtr exception = IntPtr.Zero;
IntPtr result;
#if ANYCPU
if (NativeLibrary.Is64Bit)
#endif
#if WIN64 || ANYCPU
result = NativeMethods.X64.MagickImage_GetAttribute(Instance, nameNative.Instance, out exception);
#endif
#if ANYCPU
else
#endif
#if !WIN64 || ANYCPU
result = NativeMethods.X86.MagickImage_GetAttribute(Instance, nameNative.Instance, out exception);
#endif
CheckException(exception);
return UTF8Marshaler.NativeToManaged(result);
}
}
public int GetBitDepth(Channels channels)