ntwain/NTwain/Triplets/DGImage/DGImage.IccProfile.cs

24 lines
773 B
C#
Raw Normal View History

2014-04-03 07:13:15 +08:00
using NTwain.Data;
2014-04-03 07:01:21 +08:00
using NTwain.Values;
using System;
namespace NTwain.Triplets
{
public sealed class IccProfile : OpBase
{
internal IccProfile(TwainSession session) : base(session) { }
/// <summary>
/// This operation provides the application with the ICC profile associated with the image which is
/// about to be transferred (state 6) or is being transferred (state 7).
/// </summary>
/// <param name="profile">The profile.</param>
/// <returns></returns>
public ReturnCode Get(ref TWMemory profile)
{
Session.VerifyState(6, 7, DataGroups.Image, DataArgumentType.IccProfile, Message.Get);
profile = new TWMemory();
return PInvoke.DsmEntry(Session.AppId, Session.SourceId, DataArgumentType.IccProfile, Message.Get, ref profile);
}
}
}