Welcome to LEAD Support Forum Login | Register | Faq  

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

Re: problem with RasterCodecs.Save
Started by ITProjectConsulting at 07-08-2007 5:59. Topic has 3 replies.

Print Search « Previous Thread Next Thread »
  07-08-2007, 5:59
ITProjectConsulting is not online. Last active: 1/21/2008 11:03:19 AM ITProjectConsulting

Top 500 Posts
Joined on 02-06-2007
Posts 10
problem with RasterCodecs.Save
Reply Quote

Hi,

I have one strange problem. My application (developed in c # and using version 15 leadtools) until to month all worked correctly, now  marks me it the following exception when I use the method RasterCodecs.Save().

RasterCodecs.Save, Leadtools.RasterException: Not able to open file

   at Leadtools.RasterException.CheckErrorCode(Int32 code)

   at Leadtools.Codecs.RasterCodecs.SaveOnePage(Int32 page, SaveParams saveParams)

   at Leadtools.Codecs.RasterCodecs.DoSave(SaveParams saveParams)

   at Leadtools.Codecs.RasterCodecs.Save(RasterImage image, String fileName, RasterImageFormat format, Int32 bitsPerPixel)

   at Acquisizione.Dominio.MotoreRiconoscimento.SaveImage(RasterImage image_, String pathFile_, RasterImageFormat format_, Int32 bitPerPixel_)

 

Which it is the problem?

Thanks for the attention


   Report 
  07-09-2007, 9:07
Qasem Lubani is not online. Last active: 11/9/2008 3:40:25 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,135
Re: problem with RasterCodecs.Save
Reply Quote
Can you check if you have permission to save files?
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  06-27-2008, 8:48
Param is not online. Last active: 6/27/2008 11:35:58 AM Param

Not Ranked
Joined on 06-27-2008
Posts 1
Re: problem with RasterCodecs.Save
Reply Quote

Hi Lead Tools,

The Same problem occurs for me while saving the image in .Net . Even that folder have full rights to save/delete/create the new file , but even that its through the exception.

This is Exception that i got.

Leadtools.RasterException: Not able to open file

at Leadtools.RasterException.CheckErrorCode(Int32 code)

at Leadtools.Codecs.RasterCodecs.SaveOnePage(Int32 page, SaveParams saveParams)

at Leadtools.Codecs.RasterCodecs.DoSave(SaveParams saveParams)

at Leadtools.Codecs.RasterCodecs.Save(RasterImage image, String fileName, RasterImageFormat format, Int32 bitsPerPixel)

at ImageLibrary.SaveLeadImage(String OriginalFileName, RasterImage srcImage, String savePath) in D:\ImageLibrary.cs:line 463

Looking for your reply.

Parames

 


   Report 
  06-27-2008, 10:59
jigar is not online. Last active: 11/19/2008 5:21:33 PM jigar



Top 10 Posts
Joined on 08-22-2007
Posts 447
Re: problem with RasterCodecs.Save
Reply Quote
Try the code below and see if you get an error.  For the file name in the OpenWrite() method, specify the exact same file as you did with your Save() method, so we know if there are some file access problems.
 
MemoryStream ms = new Memory Stream();
codecs.Save(ms, ... <rest of the parameters>);

FileStream fs = File.OpenWrite("your file name here");
fs.Write(ms.GetBuffer(), 0, ms.Length);
fs.Close();


LEADTOOLS Technical Support
   Report 
Post
LEAD Support Fo... » Developer » General » Re: problem with RasterCodecs.Save

Powered by Community Server, by Telligent Systems