Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, May 31, 2006 11:08:16 AM(UTC)
registerkevin

Groups: Registered
Posts: 1


Hi, I'd like to have an example of saving the multip-tiffed images into different compression format such as TIFF Group 4 and/or different resolution. I tried the properties SaveResolutionCount, SaveResolutionWidth, and SaveResolutionHeight provided by LEAD SDK Help PDF. However, the resolution size still remains the same when I checked the property of saved images.

The following is the subroutine I used to save tiffed-images with different settings.

Private Sub RepairImage(lstrSrcFileName As String, lstrDestFileName As String, lnWidth As Long, lnHeight As Long)
        Dim i As Integer
       
        Me.LEAD1.Load lstrSrcFileName, 0, 0, -1 ' load a multi-tiffed image
        
     ' This doesn't work
        Me.LEAD1.SaveResolutionCount = LEAD1.BitmapListCount
       
        For i = 0 To LEAD1.BitmapListCount - 1
       
        ' get the i page from the multi-page TIF file
        LEAD1.BitmapListIndex = i
       
            If Me.chkFixSize.Value = 1 Then
            Me.LEAD1.Size lnWidth, lnHeight, RESIZE_NORMAL
            End If
       
            If Me.chkFixDPI.Value = 1 Then
    ' Unable to save resolution.
            Me.LEAD1.InfoXRes = 600
            Me.LEAD1.InfoYRes = 600
   
    ' This doesn't work, either.
            Me.LEAD1.SaveResolutionWidth(i) = 600
            Me.LEAD1.SaveResolutionHeight(i) = 600
            End If
           
            If i = 0 Then
            Me.LEAD1.Save lstrDestFileName, Me.LEAD1.InfoFormat, LEAD1.InfoBits, QFACTOR_QS, SAVE_OVERWRITE  'compress ans size are equally important
            Else
            Me.LEAD1.Save lstrDestFileName, Me.LEAD1.InfoFormat, LEAD1.InfoBits, QFACTOR_QS, SAVE_APPEND  'compress ans size are equally important
            End If
        Next
           
End Sub

Kevin Wong

 

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, June 4, 2006 5:07:36 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

Hello,

About the SaveResolutionCount, SaveResolutionWidth, SaveResolutionHeight properties, currently, only the JBIG format uses these properties. This is why these properties don't work with TIFF file format.

However, you can change the resolution (DPI) of the file that you want save by changing the Lead1.BitmapXRes and Lead1.BitmapYRes properties before saving the TIFF file.
For more information, please refer to the following topics in the LEADTOOLS Main OCX Help File:
- BitmapXRes property (Main Control)
- BitmapYRes property (Main Control)

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Thursday, March 29, 2007 7:55:46 AM(UTC)

tjones  
tjones

Groups: Registered
Posts: 1


That works great, but then how do you keep a standard size?  8.5x11

 

Thanks,

Todd.

 
#4 Posted : Sunday, April 1, 2007 11:19:43 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

Hello,

You need to set the DPI and/or resize the image to achieve the desired width and height. The condition is that DPI = size in pixels/size in inches.

For example, if DPI is 100 and width in inches is 8.5, the width in pixels should be 850 (100 * 8.5)

And so on.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.087 seconds.