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 : Thursday, January 25, 2007 8:43:42 PM(UTC)
newmiadpe

Groups: Registered
Posts: 13


Hi!!!

I need to do something with a BMP but I can't find how to do it!

I'm going to explain what I need... Basically, I have a BMP picture and I need to close a part of it and save it as another BMP picture.

An example... I have pict1.bmp (640x240) and I want to close with a black rectangle the (10,10,100,100) coordinates. After it, I have
to save this changes in another BMP picture, pict2.bmp (640x240).

Could anybody help me? Any suggestions? I find the DrawRect function, but I don't know how it works... and I don't find any function to save it
as a BMP picture.

Thanks!!!!!

Miguel Angel.

PS: My contact mail is majcbcn@gmail.com

 

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 : Saturday, January 27, 2007 11:44:30 PM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,040

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

Using DrawRect is correct.  Another solution would be to draw a
region and then filling it with black.  Which programming
interface are you using (e.g. COM, OCX, etc.)?  I need to know in order to provide you with more details.

Thanks,

 
#3 Posted : Tuesday, January 30, 2007 10:58:21 PM(UTC)
newmiadpe

Groups: Registered
Posts: 13


I´m using COM interface. My problem now is that I know how to draw a rectangle with DrawRect, but I can´t save the new BMP with the rectangle... If I do Lead.save, the BMP saved it is the original BMP picture.
 
#4 Posted : Wednesday, January 31, 2007 6:13:02 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,040

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

Set the DrawPersistence property to True to make the rectangle permanent on the bitmap.

 
#5 Posted : Wednesday, January 31, 2007 9:53:11 PM(UTC)
newmiadpe

Groups: Registered
Posts: 13


mmmmm.... thanks!!!! I will to do it today... if I set this property to True, all the drawing changes in the BMP will be saved it if I use lead1.save??? [:)]
 
#6 Posted : Wednesday, January 31, 2007 10:12:28 PM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,040

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

Yes, that should do the trick.

 
#7 Posted : Thursday, February 1, 2007 9:28:10 PM(UTC)
newmiadpe

Groups: Registered
Posts: 13


THANKS for all!!!!!

You are right!

Miguel Angel.

 
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.134 seconds.