Welcome to LEAD Support Forum Login | Register | Faq  

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

Re: Burn Annotations ( How to Keep Bitperpixel)
Started by Neo.Ko at 04-30-2008 8:18. Topic has 4 replies.

Print Search « Previous Thread Next Thread »
  04-30-2008, 8:18
Neo.Ko is not online. Last active: 6/26/2008 8:07:43 AM Neo.Ko

Top 50 Posts
Joined on 01-25-2008
Posts 37
Burn Annotations ( How to Keep Bitperpixel)
Reply Quote

Hello.

I Use Leadtool V15(15.0.1.3) and VB.Net 2005

I load TIF File (16bpp, Grayscale) and draw annotations on the image
I burn annotations on this image then, the image change into 24bpp.

I use this code

--------------------------------------------------------
For i = 0 To pBox.Objects.Count - 1
 Dim obj As AnnObject

 obj = pBox.Objects(i)

 obj.Draw(pImg.CreateGdiPlusGraphics.Graphics)

Next
--------------------------------------------------------

'pbox is annotation container
'pImg is RasterImage(16bpp TIF Image)

I want to keep bitperpixel of the image
How to do?

please help me.
ps. I don't use automation


   Report 
  04-30-2008, 10:48
Adam Boulad is not online. Last active: 6/22/2008 2:09:06 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 335
Re: Burn Annotations ( How to Keep Bitperpixel)
Reply Quote
If you want to convert the image back to 16-bit grayscale, you can use the GrayscaleCommand Class to change the BBP.
Adam Boulad
LEADTOOLS Technical Support

   Report 
  05-01-2008, 21:53
Neo.Ko is not online. Last active: 6/26/2008 8:07:43 AM Neo.Ko

Top 50 Posts
Joined on 01-25-2008
Posts 37
Re: Burn Annotations ( How to Keep Bitperpixel)
Reply Quote

I mean not "Convert" but "Keep"

When I draw annotations on the image, is the image changed to 24bpp always?

 


   Report 
  05-05-2008, 11:10
Adam Boulad is not online. Last active: 6/22/2008 2:09:06 PM Adam Boulad



Top 10 Posts
Joined on 09-16-2007
Posts 335
Re: Burn Annotations ( How to Keep Bitperpixel)
Reply Quote

You can work around this by creating a temporary image to do the realize on, it should be something like this:

- Create a new bitmap with a black or white color.

- Transfer the Annotations to the new bitmap.

- Realize the annotation in the new bitmap.

- Use the GrayscaleCommand to convert the new image to 16-bit.

- Set a region to the non-blank area using AddColorToRegion Method.

- Copy the realize image to the original bitmap using the CombineCommand Class.
Adam Boulad
LEADTOOLS Technical Support

   Report 
  05-06-2008, 22:02
Neo.Ko is not online. Last active: 6/26/2008 8:07:43 AM Neo.Ko

Top 50 Posts
Joined on 01-25-2008
Posts 37
Re: Burn Annotations ( How to Keep Bitperpixel)
Reply Quote
Thank you for your help :)
   Report 
Post
LEAD Support Fo... » Developer » Annotations » Re: Burn Annotations ( How to Keep Bitperpixel)

Powered by Community Server, by Telligent Systems