Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Sunday, April 1, 2007 9:53:34 PM(UTC)

Groups: Registered
Posts: 7

Using: LeadTools 14.5 VCL, BDS 2006

I need to embed the functionality of the Lead Image control into a web app, so I am creating one as follows:

LeadImage1 := TLeadImage.Create(Self);
LeadImage1.Visible := FALSE;

At this point I get the error "Control '' has no parent window". I cannot set LeadImage1.Parent = Self because "Self" is not a TWinControl, nor does it have a window handle for CreateParented.

How can I create the Lead Image control in a non-visual application, or achieve the same functionality?


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, April 3, 2007 5:36:34 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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


I don't think you can use the Main VCL control without a parent window, especially if you want to display it.

I haven't tried this with a Web application in BDS before, but I think you have a better chance of getting it to work using our Raster COM objects instead of VCL.

Maen Badwan
LEADTOOLS Technical Support
#3 Posted : Tuesday, April 3, 2007 11:30:36 AM(UTC)

Groups: Registered
Posts: 7

Hi Maen:

Thanks for the information, but I don't need to display the image, just render it to a memory stream.

My Windows application stores images in CMP format in the database. This worked great. Now I need to write a web application that can read these images and deliver them as PDF files. Since the CMP format is proprietary to Lead Tools it seems like I have 3 choices:

1. Figure out a way to use the Lead Image control without a parent window so that I can manipulate the CMP image data.

2. Convert all of the CMP images to TIFF (or similar) so that I can access them using other tools. This isn't a real attractive option because my app is used by customers all over the country. I probably wouldn't have chosen CMP to begin with if I had known that I was designing myself into a corner.

3. Use some additional Lead Tools product as you suggested.

Please let me know if #1 is possible.

If not, I need to evaluate between options 2 and 3. If I need to buy some other Lead Tools package I would appreciate a specific reference. My preference would not be to deploy a COM object with my web app, but rather to do this in .NET if you have a .NET product that will access CMP images and render them. All of my web app except for the image rendering uses .NET 2.0 so this would fit in more seamlessly.

#4 Posted : Friday, April 6, 2007 12:44:04 PM(UTC)


Groups: Guests
Posts: 3,022

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

We do have .NET 2.0 assemblies that can load your CMP image and save it as PDF with only a few lines of code.

RasterCodecs codecs = new RasterCodecs();
RasterImage image = codecs.Load("pass the CMP file here");
codecs.Save(image, "output file, RasterImageFormat.RasPdf, 24);

Since your CMP file is coming from a database, you would probably extract the CMP file to a memory stream and load the file from the memory stream by passing the stream to the codecs.Load function. Our .NET SDK can be downloaded from the below link.



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