Imports LFSO83Lib Imports DocumentProcessor83 Module Module1 Sub Main() Dim app As LFApplication = New LFApplication Dim serv As LFServer Dim db As LFDatabase Dim conn As New LFConnection Try serv = app.GetServerByName("127.0.0.1") db = serv.GetDatabaseByName("Rep") conn.Shared = True conn.UserName = "user" conn.Password = "pwd" conn.Create(db) AddImage(db) conn.Terminate() Catch ex As Exception Console.WriteLine(ex.Message) End Try Console.ReadLine() End Sub Private Sub AddImage(ByRef db As LFDatabase) Dim importer As DocumentImporter = New DocumentImporter() Dim lfDoc As LFDocument = New LFDocument() Dim lfDir As LFFolder = db.GetEntryByPath("\My Folder\") Dim lfVol As LFVolume = db.GetVolumeByName("DEFAULT") lfDoc.Create("image test", lfDir, lfVol, True) lfDoc.LockObject(Lock_Type.LOCK_TYPE_WRITE) importer.Document = lfDoc importer.PageAction = Import_Page_Action.IMPORT_PAGE_ACTION_APPEND importer.ImportImagesFromFile("C:\Temp\images\sizes\bmp_big.bmp") importer.ImportImagesFromFile("C:\Temp\images\sizes\png_big.png") importer.ImportImagesFromFile("C:\Temp\images\sizes\png_small.png") importer.ImportImagesFromFile("C:\Temp\images\sizes\tif_small.tif") importer.ImportImagesFromFile("C:\Temp\images\sizes\png_small2.png") lfDoc.UnlockObject() End Sub End Module
Using images:
bmp_big.bmp 519 KB
png_big.png 281 KB
png_small.png 33 KB
tif_small.tif 3 KB
png_small2.png 3 KB
When executing the above code with the images using the LFSO80, I get significant image compression for the color images in LF, with color images being ~55 KB after import. (54KB, 55KB, 56KB, 3KB, 2KB)
When executing using the LFSO83, there is little image compression, and in fact the small color PNG increases in size 10x during import. (284KB, 285KB, 350KB, 3KB, 2KB)
Black and white images appear stay compressed on import.
Is this a known issue using the 8.3.2 SDK? Is there a newer version of the 8.3.x SDK that fixes the compression to more closely follow the 8.0 SDK?