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 : Thursday, June 29, 2006 6:59:27 PM(UTC)
danlopez007

Groups: Registered
Posts: 3


I am having problems performing the above. I am using a class that is used in "MainDemo" which does save a file but it only saves the current image in a viewer. The following is the code:

Private _saver As ImageFileSaver = New ImageFileSaver

Dim saveImage As Leadtools.IRasterImage = Me.rivImageCopy.Image

If saveImage.PageCount = 0 Then

   Exit Sub

End If

_saver.Save(Me, objCodecs, saveImage)

When I debug the page count is 2 but only 1 image is saved. The class from MainDemo does do something with pagemode

 

First is this the correct thing to do or what?

 

Thanks

 

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 : Monday, July 3, 2006 12:13:42 PM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 367

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

Dan,
It might be better to create a small test project and use the LEADTOOLS methods in it than to try to understand the whole main demo before you become familiar with the toolkit.

The RasterImage class can contain multiple images (pages). If you want to save more than one, you can use the following overload of the RasterCodecs.Save method:
Sub Save( _
   ByVal image As IRasterImage, _
   ByVal fileName As String, _
   ByVal format As RasterImageFormat, _
   ByVal bitsPerPixel As Integer, _
   ByVal firstPage As Integer, _
   ByVal lastPage As Integer, _
   ByVal firstSavePageNumber As Integer, _
   ByVal pageMode As CodecsSavePageMode _
)
The last 4 parameters of this method determine which pages are saved exactly and where they are placed in the output file. The LEADTOOLS .NET help file contains explanation and a code sample.

Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
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.057 seconds.