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 : Wednesday, August 16, 2006 7:28:15 AM(UTC)

aleayz  
aleayz

Groups: Registered
Posts: 5


Hi,

I'm upgrading the project that uses the Leadtools Document Imaging v13 to 14.5 using .Net 1.1 C#. I'm unable to find many classes that I used with the previous version. Can you please help me find the eqivalent or alternative classes for the following:

1. LEAD.Drawing.Image == Leadtools.RasterImage (right??)

2. LEAD.Drawing.Imaging.PixelFormat ??

3. LEAD.Drawing.Imaging.ColorPalette ??

4. LEAD.Drawing.Imaging.ImageProcessing.ImageProcessing.ColorResPaletteConstants ??

5. LEAD.Drawing.Imaging.ImageProcessing.ImageProcessing.ColorResDitherConstants ??

6. LEAD.Drawing.Imaging.ImageProcessing ??

Any help would be appreciated, because I'm stuck at this point.

Thanks in advance,

--Alex

 

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 : Friday, August 18, 2006 9:59:53 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


1. LEAD.Drawing.Image == Leadtools.RasterImage (right??)

yes

2. LEAD.Drawing.Imaging.PixelFormat ??

Leadtools.RasterImage.BitsPerPixel

3. LEAD.Drawing.Imaging.ColorPalette ??

Leadtools.RasterImage.Pallette

4. LEAD.Drawing.Imaging.ImageProcessing.ImageProcessing.ColorResPaletteConstants ??

Leadtools.ImageProcessing.ColorResolutionCommandPaletteFlags

5. LEAD.Drawing.Imaging.ImageProcessing.ImageProcessing.ColorResDitherConstants ??

Leadtools.RasterDitheringMethod or also look at Leadtools.RasterPaintDisplayModeFlags

6. LEAD.Drawing.Imaging.ImageProcessing ??

Leadtools.ImageProcessing

This should help you get started since I am not 100% sure about these.  .NET in 13 was really just a wrapper around the COM.  You might also want to take a look at the version history changes from 13->14 and 14->14.5 in your COM helpfile.

 
#3 Posted : Monday, August 21, 2006 6:49:03 AM(UTC)

aleayz  
aleayz

Groups: Registered
Posts: 5


Greg, thank you very much for your reply. That should get me started. You also answered my second question about the document that contains the list of changes from the v13 to v14 [:D].

I'll start based on what I have and be posting question as they arise.

Couple of questions right away, though. I was trying to use

Leadtools.RasterImage.BitsPerPixel as you suggested in place of LEAD.Drawing.Imaging.PixelFormat, but that property (BitsPerPixel) is not displayed in the IntelliSense dropdown list of the available members.

Also, in my app there are 2 diferent types, that I try to convert to the new types that are confusing:

LEAD.Drawing.Bitmap bitmap ==>> Leadtools.RasterImage bitmap

LEAD.Drawing.Image image. ==>> Leadtools.RasterImage image ???

Is there a difference?

Again, thanks a lot for your help.

--Alex

 
#4 Posted : Wednesday, August 23, 2006 9:35:54 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


I'm not sure why BitsPerPixel would not show up in your intellisense.  Is it an instance of that object or are you just doing "Leadtools.RasterImage.BitsPerPixel"?  If you look in your helpfile you will see that it is definiately a property in the RasterImage class.  I would check with Microsoft's help and see if there's anything that might be disabling or limiting the intellisense.  Just because something doesn't show up with intellisense doesn't mean that it's not available, try writing it out yourself and compiling.  If you cannot compile, then there might be a problem with LEADTOOLS.

LEAD.Drawing.Image was the base class for LEAD.Drawing.Bitmap.  There isn't really any difference.  I think that IRasterImage is the base class for RasterImage, but when you declare a new instance of IRasterImage, you have to use RasterImage. 
 
#5 Posted : Friday, August 25, 2006 3:57:39 AM(UTC)

aleayz  
aleayz

Groups: Registered
Posts: 5


Thank you Greg.

The object of the type Leadtools.RasterImage.BitsPerPixel needs to be passed into the method as a parameter. here's a snippet of the old code:

public static void ChangeResolution(LEAD.Drawing.Image image, LEAD.Drawing.Imaging.PixelFormat format,bool activePageOnly)

If I'm trying to change it to

public static void ChangeResolution(Leadtools.RasterImage image, Leadtools.RasterImage.BitsPerPixel format,bool activePageOnly) --

the .BitsperPixel method is not displayed by IntelliSense.

At the same time, if I'm trying to declare

Leadtools.ImageProcessing imageProcessing = new Leadtools.ImageProcessing()

i'm unable to use the local variable imageProcessing .

One addtional thing. before i was able to precisely indicate the current  frame that was active by using

LEAD.Drawing.Image.ActiveFrameIndex. Now i can't find the way to point to the active frame (i think you guys renamed the frame to page now, right?). Additionaly,

LEAD.Drawing.Image.SelectActiveFrame and LEAD.Drawing.Image.FrameDimension members are also missing in the new version 14.5, and so far i'm unable to find its new alternatives.

Please advise, Greg.

Thanks a lot for your help.

--Alex

 
#6 Posted : Tuesday, August 29, 2006 8:57:32 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


BitsPerPixel is just an Integer.  Try using just Integer rather than Leadtools.RasterImage.BitsPerPixel

You cannot declare a variable the same name as a class or type.  Change imageProcessing to something like imgProcessing.

For multipage files, the Page property is the currently selected.  I'm not sure about SelectActiveFrame and FrameDimension, but I would imagine that SelectActiveFrame allowed you to set the currently selected page.  Just change the Page index of your RasterImage.  FrameDimension is probably just the Width and Height properties combined.
 
#7 Posted : Wednesday, September 6, 2006 4:23:20 AM(UTC)

aleayz  
aleayz

Groups: Registered
Posts: 5


Thanks again, Greg. I'm slowly making progress.

if I try to isntantiate the object of type  ImageProcessing like the following:

Leadtools.ImageProcessing imgProc = new Leadtools.ImageProcessing()

and try to use imgProc, it doesn't allow me and no intellisense list is available. Are you sure i can instantiate the object of that type?

A couple of additional questions about the type Lead.Drawing.Image that was available in v13 and its methods, that I could not find an alternative equivalent to:

1. Image.GetGraphics()

2.  Image.ReleaseGraphics()

3.  Image.ToImage()

4.  Lead.Drawing.bitmap.MakeTransparent()

Here's a line that i try to rewrite:

bitmap.MakeTransparent(Color.White)

To imitate the transparency, according to the Help I tried to create a mask and use the

.CreateAlphaImage method like this:

Leadtools.IRasterImage alphaImage;

System.Drawing.Rectangle rectangle = new System.Drawing.Rectangle(bitmap.XResolution,

bitmap.YResolution,

bitmap.Width,

bitmap.Height);

bitmap.AddRectangleToRegion(null, rectangle, RasterRegionCombineMode.Set);

IRasterImage alphaImage = bitmap.CreateMaskFromRegion();

bitmap.SetAlphaImage(alphaImage);

alphaImage = bitmap.CreateAlphaImage();

bitmap.AddMaskToRegion(null, alphaImage, RasterRegionCombineMode.Set);

But it doesn't work, plus I'm not sure. where and what i can actually set to something similar to Maketransperant method and how I would pass White color into it. Please advise.

As always, thank you very much for your help and effort.

Alex

 
#8 Posted : Monday, September 11, 2006 8:23:48 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


Leadtools.ImageProcessing is a namespace, not an object.  You cannot create an instance of this.

1. Take look at the "IRasterImage.CreateGdiPlusGraphics" function or "RasterImage.ConvertToGdiPlusImage" function

2. I don't think that exists anymore, there is a DeleteLeadDC, but I do not think it is the same thing.  The object returned by CreateGdiPlusGraphics can be disposed of just like any other object.

3. Take look at the "IRasterImage.CreateGdiPlusGraphics" function or "RasterImage.ConvertToGdiPlusImage" function

4. Take a look at the "RasterImage.Transparent" property

There are tutorials on how to implement transparency with the .NET libraries in 14.5.  Take a look at "Implementing Transparency" and "IRasterImage.TransparentColor Property"
 
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.117 seconds.