You are viewing limited content. For full access, please sign in.

Question

Question

Importing TIF through SDK modifies colors

SDK
asked on June 23, 2016

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

 

0 0

Replies

replied on June 23, 2016

This sounds like a bug that was fixed in 9.0. Are you sure you are using the 10 version of DocumentImporter (the .NET class from Laserfiche.DocumentServices.dll)? You can use GetAssembly to verify the version, or view the process properties using Process Explorer and search for Laserfiche.DocumentServices.dll

0 0
replied on June 23, 2016

This is the reference I am using in Visual Studio:

This is the .NET Assembly that Process Explorer is showing as being referenced by our program:

0 0
replied on June 24, 2016

Thank you, we can reproduce the issue and a bug report has been filed (#146022).

0 0
replied on June 24, 2016

Thank you for the update. Is this an issue that a Laserfiche Server upgrade could resolve?

0 0
replied on June 24, 2016

No, this is a bug in the SDK

0 0
replied on June 28, 2016

Is it possible for us to track the bug report status or resolution ETA? Thank you.

0 0
replied on June 28, 2016

The reference number is 146022, it is currently targeted for Laserfiche 11.

0 0
replied on July 27, 2016

Is there a time frame as to when reference 146022 is slated to be available?  I need to communicate this to my customer.  Thanks.

0 0
replied on July 27, 2016

The software issue has been fixed in software engineering and will be available in the next version of Laserfiche, tentatively version 11.

In order to receive communication and updates, and to make an engineering request for the current version of Laserfiche 10, please open a support case with Laserfiche Support. Please mention this post when communicating with our staff.

While we acknowledge that Laserfiche Answers provides a smoother experience in terms of inquiring software issues, certain actions such as notifications about case updates and engineering requests must still go through Laserfiche Support.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.