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 : Tuesday, December 8, 2009 4:07:43 AM(UTC)
paimon.soror.csc

Groups: Registered
Posts: 4


Hello folks.

My name is Paimon Sorornejad and I am a contractor for Pratt & Whitney.  We are currently working on developing an application and are in the process of getting the approval to obtain a license for the LeadTools software.  In the meantime I have been directed to the evaluation copy to start.

One of the major portions of our project is its ability to convert a CGM file to a TIFF image and a CALS image.  I currently have the example applications and see that it is indeed possible, but because the application is an MFC project it is a bit hard locating exactly where the "guts" of the code are. 

Would anyone be able to provide a very small example on how to do a file conversion?  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 : Tuesday, December 8, 2009 5:01:02 AM(UTC)
paimon.soror.csc

Groups: Registered
Posts: 4


Also I was hoping to get a non MFC example, thanks
 
#3 Posted : Tuesday, December 8, 2009 6:15:02 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,028

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

By non-MFC, do you mean plain C language or something else?
Currently, loading CGM files is only supported in our DLL API functions and C++ Class Library.

Note: The conversion also works with our Main OCX control, but you will have to contact our sales department to see if there's a combination of products is available that allows you to use the OCX with Vector redist files.
 
#4 Posted : Wednesday, December 9, 2009 4:21:01 AM(UTC)
paimon.soror.csc

Groups: Registered
Posts: 4


Yes I am looking for a c/c++ implementation.  Ideally my goal is to create a program that I can pass command line arguments of the file name and the output file name and have the conversion occur.  I actually managed to get started on this, maybe you can take a look?  Thanks.
 
#5 Posted : Wednesday, December 9, 2009 4:22:16 AM(UTC)
paimon.soror.csc

Groups: Registered
Posts: 4


Sorry seems that i cant attach a cpp file.  I renamed it to txt...
File Attachment(s):
ConsoleConverter.txt (4kb) downloaded 21 time(s).
 
#6 Posted : Thursday, December 10, 2009 3:33:23 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,028

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

Here are some tips:
1. If the input is a vector format, it's better to set the view port using the L_2DSetViewport function.
2. When saving JPEG-compressed PDF, the quality factor parameter is important.
3. You're saving using FILE_TIFF format which is an uncompressed format and will cause the file size to be relatively large. I suggest that you use a losseless file format such as FILE_TIFLZW.

Your approach is correct in general, so if you face a problem with your code please feel free to contact us with more details regarding the issue you are having.

 
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-2020, Yet Another Forum.NET
This page was generated in 0.138 seconds.