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, September 13, 2007 11:08:29 AM(UTC)
wvandenberge

Groups: Registered
Posts: 3


Hello,

I bought the Raster Imaging Pro v15 product and, for now, I need to create an application that does just one thing without ANY user interaction:

1) cycle through a directory
2) open every .tif file (could be any kind of tiff) in there
3) make it 300dpi
4) save it as a group4 tiff.

Does someone have a snippet laying around for parts 2-4 that doesn't rely on any of the lead dialogs?

I can probably figure this out in time but I underestimated the complexity (and probably the resulting depth of functionality) of this component.


thank you

Wilem
 

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 : Thursday, September 13, 2007 11:48:51 AM(UTC)

BoydP  
Guest

Groups: Guests
Posts: 3,022

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

What programming interface are you using?
 
#3 Posted : Thursday, September 13, 2007 1:48:32 PM(UTC)
wvandenberge

Groups: Registered
Posts: 3


.net 2.0.

C# has my pref but I'll happily take vb.net

thanks

W
 
#4 Posted : Friday, September 14, 2007 4:18:15 AM(UTC)

BoydP  
Guest

Groups: Guests
Posts: 3,022

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

Your project will need to reference Leadtools.dll and Leadtools.Codecs.dll.  Leadtools.Codecs.Tif.dll must also be added as a or reference OR put in the directory where your program executes from.  This code snippet should get you started in the right direction:

//you will have to provide the following routine for acquiring tiff files.
string[] tifFiles = FindTiffFiles();

RasterCodecs.Startup();
RasterCodecs codecs = new RasterCodecs();

foreach (string file in tifFiles)
{
   RasterImage image = codecs.Load(file);

   image.XResolution = 300;
   image.YResolution = 300;

   codecs.Save(image, file, RasterImageFormat.TifxFaxG4, 1);
}

If you have anymore questions please feel free to ask.
 
#5 Posted : Monday, September 17, 2007 10:52:58 AM(UTC)
wvandenberge

Groups: Registered
Posts: 3


at the risk of looking like a complete idiot that's as far as I got before. However the codecs.save metod gives me "Feature not supported"

any thoughts?

Willem
 
#6 Posted : Monday, September 17, 2007 11:42:16 AM(UTC)

BoydP  
Guest

Groups: Guests
Posts: 3,022

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

I am sorry you are correct, the example does not work at posted.  You must also reference Leadtools.Codecs.Fax.dll and replace RasterImageFormat.TifxFaxG4 with RasterImageFormat.CcittGroup4.  I am sorry for the error, these changes will make the code work. 

For a broader overview of the subject please refer to the Raster .NET Class Library help file.  Look at the RasterImageFormat enumeration as well as the "Files to be included with your application" section.  All of the information regarding codecs and dlls to be referenced/included are contained in that section.

If you have anymore questions please feel free to ask.
 
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.072 seconds.