Welcome to LEAD Support Forum Login | Register | Faq  

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

Problem converting from .cgm to .cal
Started by Kaunda at 04-10-2008 7:21. Topic has 32 replies.

Print Search « Previous Thread Next Thread »
  04-10-2008, 7:21
Kaunda is not online. Last active: 10/21/2008 7:50:20 AM Kaunda

Top 100 Posts
Joined on 04-10-2008
Posts 26
Problem converting from .cgm to .cal
Reply Quote

I use LeadTools version 14.5 from a Delhpi VCL environment and I try to convert files in .cgm format to .cal or .tif but it doesn't work! I get a "Not supported" error message when I save the file, the load of the .cgm file seems to be working OK but not the save to the new format. Is this a known problem? and what can I do to make it work?
I would appreciate any solution or suggestion!

Thanks,

Kaunda


Regards,
Kaunda
   Report 
  04-11-2008, 10:29
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 converting from .cgm to .cal
Reply Quote
Hello Kaunda,

What file constant are you specifying in the save method?  I don't see any for .cal files.  It could be that you don't have the filter lf***.dll file in the PATH, or that the file format you are trying to save as is only available in the Document or Medical toolkit.

LEADTOOLS Technical Support
   Report 
  04-14-2008, 2:24
Kaunda is not online. Last active: 10/21/2008 7:50:20 AM Kaunda

Top 100 Posts
Joined on 04-10-2008
Posts 26
Re: Problem converting from .cgm to .cal
Reply Quote

I have used file constant 50 for .cal files in the save method and I don't think that's the problem, I have successfully converted to .cal files from other types, for example from .jpg and .gif.
I think that the problem lies with .cgm files!! Do you know if it is at all possible to convert from .cgm to .cal using the LeadTools utility? or do you know any other converstion utility that can handle this?

Regards,
Kaunda


Regards,
Kaunda
   Report 
  04-14-2008, 16:12
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 converting from .cgm to .cal
Reply Quote
Hi Kaunda,

Oh I see now.  CGM files are vector images and you need the Vector toolkit to read them.  JPEGs and GIFs are raster images.

LEADTOOLS Technical Support
   Report 
  04-17-2008, 2:13
Kaunda is not online. Last active: 10/21/2008 7:50:20 AM Kaunda

Top 100 Posts
Joined on 04-10-2008
Posts 26
Sv: Re: Problem converting from .cgm to .cal
Reply Quote
Thanks for your reply, but how do I know if I have installed the Vector toolkit? As far as I know I have installed it but I'm a rookie on this product!
We have bought a full license of version 15 but only installed version 14.5 for the simple reason that our systems run on a Delphi platform (VCL). We have installed all parts of version 14.5 but I still can't convert .cgm files to any other file formats!
I can read/load .cgm files but I get an error message/exception from the "Save" method when trying to convert them to any other format!
I have looked in the helpfiles but have not found anything that can guide me.
Do you know if there is some kind of table where I can see which file formats that can be converted to other formats?
Regards,
Kaunda
   Report 
  04-17-2008, 18:00
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: Sv: Re: Problem converting from .cgm to .cal
Reply Quote
Can you display the CGM image on the screen?  Also attach the CGM file to your post and I can test it here.

To check if you have the Vector toolkit, goto Start > All Programs > LEADTOOLS and it should say "Vector Imaging Pro" under "Raster Imaging Pro".

LEADTOOLS Technical Support
   Report 
  04-21-2008, 4:26
Kaunda is not online. Last active: 10/21/2008 7:50:20 AM Kaunda

Top 100 Posts
Joined on 04-10-2008
Posts 26
Sv: Re: Sv: Re: Problem converting from .cgm to .cal
Reply Quote
Thanks!
I seem to have the Vector toolkit installed. Does this mean that I should be able to convert from .cgm to .cal files?

I have searched the helpfile for a "cross-reference" table where I can verify which file formats that can be converted to other file formats, but I have not yet found one. Is there such a cross-reference table?
Regards,
Kaunda
   Report 
  04-21-2008, 9:55
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: Sv: Re: Sv: Re: Problem converting from .cgm to .cal
Reply Quote
We don't have a cross-reference table, but you can look at the Vector and Raster help files for the supported file formats.  Since you are converting from vector to raster you have to do an extra step.  You open the file and call the realize method to rasterize the vector.  There's an example in the vector help file abou that.  Once the vector is rasterized you can save it as any file format supported by the raster toolkit.

LEADTOOLS Technical Support
   Report 
  04-22-2008, 2:30
Kaunda is not online. Last active: 10/21/2008 7:50:20 AM Kaunda

Top 100 Posts
Joined on 04-10-2008
Posts 26
Sv: Re: Sv: Re: Sv: Re: Problem converting from .cgm to .cal
Reply Quote
Thanks again! That seems to be an excellent solutions BUT the problem is that I can't find the realize method in version 14.5!! Does this apply only to version 15?

I have used the TLEADImage control in my Delphi program and I can find three "rasterize" methods (RasterizeWiewportWidth, RasterizeWiewportHeight and RasterizeWiewMode) but I don't think that any of them would work for me since the are called before the load! and if understand you correctly I should use the following sequence:
1. Load the .cgm file
2. Call the Realize method to rasterize the file
3. Save it to any other file format
Regards,
Kaunda
   Report 
  04-22-2008, 10:14
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: Sv: Re: Sv: Re: Sv: Re: Problem converting from .cgm to .cal
Reply Quote
The Vector toolkit in v14.5 is for API, Classlib, and ActiveX.  There's no VCL for it.  In API you call L_VecLoadFile(), then call L_VecRealize().  L_VecRealize() will populate the BITMAPHANDLE you pass in to it.  Then you can save it with L_SaveBitmap().

LEADTOOLS Technical Support
   Report 
  04-25-2008, 4:33
Kaunda is not online. Last active: 10/21/2008 7:50:20 AM Kaunda

Top 100 Posts
Joined on 04-10-2008
Posts 26
Sv: Re: Sv: Re: Sv: Re: Sv: Re: Problem converting from .cgm to .cal
Reply Quote
I see, I guess this means that I have to use the API solution in order to do this!
I have not used API calls in a Delphi program before, do you by any chance have an example of this? I guess I need to add some API-interface code to my Delphi program.
I appreciate your assistance!
Regards,
Kaunda
   Report 
  04-25-2008, 12:58
Walter is not online. Last active: 11/13/2008 12:56:37 PM Walter



Top 25 Posts
Joined on 04-14-2008
Charlotte, NC
Posts 112
Re: Problem converting from .cgm to .cal
Reply Quote
Hi Kaunda,

You can find an example of using the API in Delphi in the following Lead directory:
..\LEADTOOLS 14.5\Examples\DLL\Delphi

This should get you started.
Walter
Technical Support
LEADTOOLS
support@leadtools.com
   Report 
  04-29-2008, 7:04
Kaunda is not online. Last active: 10/21/2008 7:50:20 AM Kaunda

Top 100 Posts
Joined on 04-10-2008
Posts 26
Sv: Re: Problem converting from .cgm to .cal
Reply Quote
I have looked at the Delphi-examples but I still don't understand how i should get access to the following units: LTDLLUNT, LTDLLTYP, LTDLLDEF.
They are included in the uses list of one of your Delphi program examples (main.pas). Is there a particular DLL that I need to copy to the folder where I compile my program or how does it work?
Regards,
Kaunda
   Report 
  05-02-2008, 16:54
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: Sv: Re: Problem converting from .cgm to .cal
Reply Quote
Hello,

Sorry for the late reply.  I've been very busy with testing some projects.  Goto your LEADTOOLS install directory and take a look at the Uses folder.  You have the .inc files there that you need.

LEADTOOLS Technical Support
   Report 
  05-06-2008, 9:55
Kaunda is not online. Last active: 10/21/2008 7:50:20 AM Kaunda

Top 100 Posts
Joined on 04-10-2008
Posts 26
Sv: Re: Sv: Re: Problem converting from .cgm to .cal
Reply Quote
Thanks, I can now at least compile my program but it still doesn't work!
The first parameter in the call to the method L_VecLoadFile in the Vector Toolkit should be a filename, but should it contain the full path as well as the filename?
If for example my inputfile is located in C:\WORK and has the filename of test.cgm how should the filename parameter be coded?
I have tried different ways but I always get a non-successful returncode! or do I have to load the file into memory before issuing the call to L_VecLoadFile?
Regards,
Kaunda
   Report 
Post
 Page 1 of 3 (33 items) 1 2 3 »
LEAD Support Fo... » Developer » File Formats » Problem converting from .cgm to .cal

Powered by Community Server, by Telligent Systems