LEADTOOLS WCF (Leadtools.Services.Raster.ServiceContracts assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.30
GetInformation Method
See Also 
Leadtools.Services.Raster.ServiceContracts Namespace > IRasterService Interface : GetInformation Method



request
A System.ServiceModel.MessageContractAttribute containing the data that will be used in this GetInformation operation.

The GetInformation Method is available in LEADTOOLS Document and Medical Imaging toolkits.

request
A System.ServiceModel.MessageContractAttribute containing the data that will be used in this GetInformation operation.
Gets the image information.

Syntax

Visual Basic (Declaration) 
<OperationContractAttribute("GetInformation")>
<FaultContractAttribute(DetailType=Leadtools.Services.Raster.FaultContracts.RasterFault, 
   Action="", 
   Name="", 
   Namespace="", 
   ProtectionLevel=ProtectionLevel.None, 
   HasProtectionLevel=False)>
Function GetInformation( _
   ByVal request As GetInformationRequest _
) As GetInformationResponse
Visual Basic (Usage)Copy Code
Dim instance As IRasterService
Dim request As GetInformationRequest
Dim value As GetInformationResponse
 
value = instance.GetInformation(request)
C# 
[OperationContractAttribute("GetInformation")]
[FaultContractAttribute(DetailType=Leadtools.Services.Raster.FaultContracts.RasterFault, 
   Action="", 
   Name="", 
   Namespace="", 
   ProtectionLevel=ProtectionLevel.None, 
   HasProtectionLevel=false)]
GetInformationResponse GetInformation( 
   GetInformationRequest request
)
C++/CLI 
[OperationContractAttribute("GetInformation")]
[FaultContractAttribute(DetailType=Leadtools.Services.Raster.FaultContracts.RasterFault, 
   Action="", 
   Name="", 
   Namespace="", 
   ProtectionLevel=ProtectionLevel.None, 
   HasProtectionLevel=false)]
GetInformationResponse^ GetInformation( 
   GetInformationRequest^ request
) 

Parameters

request
A System.ServiceModel.MessageContractAttribute containing the data that will be used in this GetInformation operation.

Return Value

A System.ServiceModel.MessageContractAttribute containing the image information.

Example

Visual BasicCopy Code
Public Sub GetInformationExample()
  Dim client As IRasterService = New RasterServiceClient()
  Dim sourceBinaryData As RawBinaryData = New RawBinaryData()
  sourceBinaryData.Data = File.ReadAllBytes(LeadtoolsExamples.Common.ImagesPath.Path & "image1.cmp")

  Dim informationRequest As GetInformationRequest = New GetInformationRequest()

  informationRequest.Source= sourceBinaryData
  informationRequest.PageNumber = 1
  informationRequest.TotalPages = False

  Dim response As GetInformationResponse = client.GetInformation(informationRequest)
  If Not response Is Nothing Then
    Console.WriteLine(String.Format("BytesPerLine: {0}", response.BytesPerLine))
    Console.WriteLine(String.Format("ColorSpace: {0}", response.ColorSpace.ToString()))
    Console.WriteLine(String.Format("Compresion: {0}", response.Compression))
    Console.WriteLine(String.Format("Format: {0}", response.Format))
    Console.WriteLine(String.Format("HasAlpha: {0}", response.HasAlpha))
    Console.WriteLine(String.Format("HasResolution: {0}", response.HasResolution))
    Console.WriteLine(String.Format("Height: {0}", response.Height))
    Console.WriteLine(String.Format("IsRotated: {0}", response.IsRotated))
    Console.WriteLine(String.Format("IsSigned: {0}", response.IsSigned))
    Console.WriteLine(String.Format("Order: {0}", response.Order))
    Console.WriteLine(String.Format("PageNumber: {0}", response.PageNumber))
    Console.WriteLine(String.Format("SizeDisk: {0}", response.SizeDisk))
    Console.WriteLine(String.Format("SizeMemory: {0}", response.SizeMemory))
    Console.WriteLine(String.Format("TotalPages: {0}", response.TotalPages))
    Console.WriteLine(String.Format("ViewPerspective: {0}", response.ViewPerspective))
    Console.WriteLine(String.Format("Width: {0}", response.Width))
    Console.WriteLine(String.Format("XResolution: {0}", response.XResolution))
    Console.WriteLine(String.Format("YResolution: {0}", response.YResolution))
  End If
End Sub
C#Copy Code
public void GetInformationExample()
   {
      IRasterService client = new RasterServiceClient();
      RawBinaryData sourceBinaryData = new RawBinaryData();
      sourceBinaryData.Data = File.ReadAllBytes(Path.Combine(LEAD_VARS.ImagesDir, "image1.cmp"));

      GetInformationRequest informationRequest = new GetInformationRequest();

      informationRequest.Source= sourceBinaryData;
      informationRequest.PageNumber = 1;
      informationRequest.TotalPages = false;

      GetInformationResponse response = client.GetInformation(informationRequest);
      if (response != null)
      {
         Console.WriteLine(string.Format("BytesPerLine: {0}", response.BytesPerLine));
         Console.WriteLine(string.Format("ColorSpace: {0}", response.ColorSpace.ToString()));
         Console.WriteLine(string.Format("Compresion: {0}", response.Compression));
         Console.WriteLine(string.Format("Format: {0}", response.Format));
         Console.WriteLine(string.Format("HasAlpha: {0}", response.HasAlpha));
         Console.WriteLine(string.Format("HasResolution: {0}", response.HasResolution));
         Console.WriteLine(string.Format("Height: {0}", response.Height));
         Console.WriteLine(string.Format("IsRotated: {0}", response.IsRotated));
         Console.WriteLine(string.Format("IsSigned: {0}", response.IsSigned));
         Console.WriteLine(string.Format("Order: {0}", response.Order));
         Console.WriteLine(string.Format("PageNumber: {0}", response.PageNumber));
         Console.WriteLine(string.Format("SizeDisk: {0}", response.SizeDisk));
         Console.WriteLine(string.Format("SizeMemory: {0}", response.SizeMemory));
         Console.WriteLine(string.Format("TotalPages: {0}", response.TotalPages));
         Console.WriteLine(string.Format("ViewPerspective: {0}", response.ViewPerspective));
         Console.WriteLine(string.Format("Width: {0}", response.Width));
         Console.WriteLine(string.Format("XResolution: {0}", response.XResolution));
         Console.WriteLine(string.Format("YResolution: {0}", response.YResolution));
      }
   }

static class LEAD_VARS
{
   public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}

Remarks

This method is supported when hosting using WebHttpBinding.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

Applications developed with LEADTOOLS WCF components require runtime licenses. Server licensing is required for applications on a server. For more information, refer to: Imaging Pro/Document/Medical Features