We have a group of images that when we import them through the SDK, their color is modified; however, when imported through the LF Client, no change occurs.
Import through SDK:
Import through LF Client:
The LF Server and Client are both version 9.2.1. We have tried with the following SDKs and had the same result with each, so it seems to be server-related but SDK version-independent: LFSO80, LFSO83, RA10.
Below is the RA code used to import the attached sample image. Are there settings available we can use to have the SDK mimic how the LF Client performs the image import or is there another solution to preserve the images' color and quality?
Sub UploadImage(ByVal filePath As String, ByVal asBytes As Boolean) Try Dim serv As New Server("myserver") Dim rep As New RepositoryRegistration(serv, "myrep") Dim session As New Session() session.LogIn(rep) Dim docId As Integer = Document.Create(System.IO.Path.GetFileNameWithoutExtension(filePath), "DEFAULT", EntryNameOption.AutoRename, session) Dim lfEntry As DocumentInfo = Document.GetDocumentInfo(docId, session) Dim importer As New DocumentImporter() importer.Document = CType(lfEntry, DocumentInfo) If asBytes Then Using ms As New System.IO.MemoryStream(System.IO.File.ReadAllBytes(filePath)) importer.ImportImages(ms) End Using Else importer.ImportImages(filePath) End If lfEntry.Save() Catch ex As Exception Throw New Exception("Error importing file: " + ex.Message) End Try End Sub