Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Problem in Loding multipage image into the database
Started by nitin125 at 10-17-2006 3:36. Topic has 3 replies.

Print Search « Previous Thread Next Thread »
  10-17-2006, 3:36
nitin125 is not online. Last active: 3/28/2007 9:15:19 AM nitin125

Not Ranked
Joined on 10-17-2006
Posts 2
Problem in Loding multipage image into the database
Reply Quote

How can I Save Multi-Page TIFF file into SQL2000 database.

I am able to save a single page file in the database by converting the IRasterImage into a byte() array

'''#######################

Dim Ret As Byte()

' Using

Dim ms As MemoryStream = New MemoryStream

Try

imageToConvert.Save(ms, formatOfImage)

Ret = ms.ToArray

Finally

CType(ms, IDisposable).Dispose()

End Try

Return Ret

'##########################

 

when I try to do the same with the multi page file it saved only the first page of the image file.

I also try the memorystream.seek method but still it saved only first page.

Please help me.

thanks

nitin tikkha


   Report 
  10-18-2006, 10:35
Amin is not online. Last active: 8/7/2008 10:50:51 AM Amin



Top 10 Posts
Joined on 06-27-2005
Posts 748
Re: Problem in Loding multipage image into the database
Reply Quote
Nitin,
You should be able to do that using the method RasterCodecs.Save( _
   ByVal image As IRasterImage, _
   ByVal stream As Stream, _
   ByVal format As RasterImageFormat, _
   ByVal bitsPerPixel As Integer, _
   ByVal firstPage As Integer, _
   ByVal lastPage As Integer, _
   ByVal firstSavePageNumber As Integer, _
   ByVal pageMode As CodecsSavePageMode _
)

For details on using it to save multi-page files to a stream, see its help topic in our .NET toolkit documentation.


Amin Dodin
LEADTOOLS Technical Support

   Report 
  10-19-2006, 2:01
nitin125 is not online. Last active: 3/28/2007 9:15:19 AM nitin125

Not Ranked
Joined on 10-17-2006
Posts 2
Re: Problem in Loding multipage image into the database
Reply Quote

Hi,

I have tried this option also but I can save only first page. following post http://support.leadtools.com/SupportPortal/cs/forums/875/ShowPost.aspx gives some insight of the problem but i am unable to find any patch for this. Presently I am having the demo version of leedtools.

I tried to save the rasterImage object in a byte array but , it throw following error with version 14.5.0.1. although this approch works with the version 14.5.0.4.

'''########################################################

at Leadtools.Kernel.SerializeDitherData(SerializationInfo info, String name, Object pDitherData)

   at Leadtools.Kernel.BitmapHandle.GetObjectData(SerializationInfo info, StreamingContext context)

   at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter)

   at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter)

   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)

   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)

   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)

   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers)

   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)

 


   Report 
  10-22-2006, 8:42
Amin is not online. Last active: 8/7/2008 10:50:51 AM Amin



Top 10 Posts
Joined on 06-27-2005
Posts 748
Re: Problem in Loding multipage image into the database
Reply Quote
Nitin,
You should not be using build 14.5.0.1 or 14.5.0.4 because they're both old. If you don't have build 14.5.0.13, please download the latest setup from our site and test with it.
The problem in the post you mention was fixed around build 14.5.0.5.


Amin Dodin
LEADTOOLS Technical Support

   Report 
Post
LEAD Support Fo... » Developer » Database » Problem in Loding multipage image into the database

Powered by Community Server, by Telligent Systems