/// <summary> /// Creates a new instance of the <see cref="Transform"/> class for a multiprofile transform. /// </summary> /// <param name="context">A <see cref="Context"/>, or null for the global context.</param> /// <param name="profiles">An array of profiles.</param> /// <param name="inputFormat">The input format, e.g., <see cref="Cms.TYPE_RGB_8"/>.</param> /// <param name="outputFormat">The output format, e.g. <see cref="Cms.TYPE_Lab_8"/>.</param> /// <param name="intent">The intent.</param> /// <param name="flags">The flags to control the process.</param> /// <returns>A new <see cref="Transform"/> instance.</returns> /// <exception cref="LcmsNETException"> /// Failed to create instance. /// </exception> /// <remarks> /// <para> /// Creates the instance in the global context if <paramref name="context"/> is null. /// </para> /// </remarks> public static Transform Create(Context context, Profile[] profiles, uint inputFormat, uint outputFormat, Intent intent, CmsFlags flags) { return(new Transform(Interop.CreateMultiprofileTransform(context?.Handle ?? IntPtr.Zero, profiles.Select(_ => _.Handle).ToArray(), inputFormat, outputFormat, Convert.ToUInt32(intent), Convert.ToUInt32(flags)), context)); }