示例#1
0
 /// <summary>
 /// Creates a new instance of the <see cref="Transform"/> class for a proofing transform.
 /// </summary>
 /// <param name="context">A <see cref="Context"/>, or null for the global context.</param>
 /// <param name="input">A profile capable to work in the input direction.</param>
 /// <param name="inputFormat">The input format, e.g., <see cref="Cms.TYPE_RGB_8"/>.</param>
 /// <param name="output">A profile capable to work in the output direction.</param>
 /// <param name="outputFormat">The output format, e.g. <see cref="Cms.TYPE_Lab_8"/>.</param>
 /// <param name="proofing">A proofing profile.</param>
 /// <param name="intent">The intent.</param>
 /// <param name="proofingIntent">The proofing 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>
 /// To enable proofing and gamut check include <see cref="CmsFlags.SoftProofing"/>|<see cref="CmsFlags.GamutCheck"/>.
 /// </para>
 /// <para>
 /// Creates the instance in the global context if <paramref name="context"/> is null.
 /// </para>
 /// </remarks>
 public static Transform Create(Context context, Profile input, uint inputFormat, Profile output, uint outputFormat,
                                Profile proofing, Intent intent, Intent proofingIntent, CmsFlags flags)
 {
     return(new Transform(Interop.CreateTransform(context?.Handle ?? IntPtr.Zero, input.Handle, inputFormat,
                                                  output.Handle, outputFormat, proofing.Handle, Convert.ToUInt32(intent),
                                                  Convert.ToUInt32(proofingIntent), Convert.ToUInt32(flags)), context));
 }
示例#2
0
 /// <summary>
 /// Creates a new instance of the <see cref="Transform"/> class.
 /// </summary>
 /// <param name="input">A profile capable to work in the input direction.</param>
 /// <param name="inputFormat">The input format, e.g., <see cref="Cms.TYPE_RGB_8"/>.</param>
 /// <param name="output">A profile capable to work in the output direction.</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.
 /// </para>
 /// </remarks>
 public static Transform Create(Profile input, uint inputFormat, Profile output, uint outputFormat,
                                Intent intent, CmsFlags flags)
 {
     return(new Transform(Interop.CreateTransform(input.Handle, inputFormat,
                                                  output.Handle, outputFormat, Convert.ToUInt32(intent), Convert.ToUInt32(flags))));
 }