This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Sunday, July 8, 2007 12:54:53 AM(UTC)
Groups: Registered
Posts: 7
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
#2
Posted
:
Monday, July 9, 2007 4:02:21 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Can you check if you
have permission to save files?
#3
Posted
:
Friday, June 27, 2008 3:43:22 AM(UTC)
Groups: Registered
Posts: 1
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
#4
Posted
:
Friday, June 27, 2008 5:54:33 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
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();
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.