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 : Monday, February 9, 2009 11:46:02 PM(UTC)

jy11  
jy11

Groups: Registered
Posts: 5


how to copy a JPEG in a fixed coordinate(X,Y) and save it as a new image.I need it to be done in VB6.I'm using Leadtools 12.1
 

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, February 10, 2009 5:34:39 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,028

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

Do you mean that you want copy a certain rectangle of the image and copy it to a new image? If not, provide me with more details.
What is the LEADTOOLS programming interface (COM, ActiveX, DLL API, etc.) that you are using?
 
#3 Posted : Tuesday, February 10, 2009 4:35:34 PM(UTC)

jy11  
jy11

Groups: Registered
Posts: 5


Yes. I wan copy a certain rectangle of the image and save it as a new image. i m using DLL.
 
#4 Posted : Wednesday, February 11, 2009 5:48:36 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,028

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

Try to use the L_CopyBitmapRect and then use the image that is created to save it to a new image.
If this is not what you need, please provide me with more details.
 
#5 Posted : Wednesday, February 11, 2009 4:52:59 PM(UTC)

jy11  
jy11

Groups: Registered
Posts: 5


i try use L_CopyBitmapRect but it is not work.
i m using ltkrn13n.dll.
Below is my code to load and save the image.
{
LockWindowUpdate imgFront.hwnd
imgFront.Load strImagePath, 0, 0, 1
imgFront.PaintSizeMode = PAINTSIZEMODE_NORMAL

imgFront.DstWidth = imgFront.DstWidth
imgFront.DstHeight = imgFront.DstHeight
imgFront.DstTop = ((imgFront.DstHeight / 100) * (-30))
imgFront.DstLeft = ((imgFront.DstWidth / 100) * (-75))

imgFront.DstClipWidth = imgFront.DstWidth
imgFront.DstClipHeight = imgFront.DstHeight
imgFront.DstClipLeft = imgFront.DstLeft
imgFront.DstClipTop = imgFront.DstTop
imgFront.ForceRepaint

imgFront.StartMagGlass 420, 210, 200, _
vbBlack, imgFront.BackColor, _
False, 2, True, CROSSHAIR_NONE, False, True

save_value = imgFront.Save(App.Path & "_editFF.jpg", 3, 24, 0, SAVE_OVERWRITE)

LockWindowUpdate 0
}
 
#6 Posted : Wednesday, February 11, 2009 11:51:51 PM(UTC)

jy11  
jy11

Groups: Registered
Posts: 5


Is there any initial declaration needed for L_CopyBitmapRect?
 
#7 Posted : Thursday, February 12, 2009 5:31:42 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,028

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

You mentioned LEADTOOLS 12.1 but then mention ltkrn13n.dll. This DLL is part of LEADTOOLS 13, not 12.1. Which version are you using exactly?

Also, you mention using the DLL API, but the code you sent looks similar to Main OCX code. If that's the case, you can save a rectangle by doing the following steps:
- Create a second control and copy the image to is like this
Lead2.Bitmap = imgFront.Bitmap
- Use the Trim method to crop the image in the second control to the desired rectangle.
- Use the Lead2.Save to save the cropped image.
 
#8 Posted : Sunday, February 15, 2009 10:16:32 PM(UTC)

jy11  
jy11

Groups: Registered
Posts: 5


I'm just new to Leadtools development.
Anyhow, thank you for your guiding:D
I successful get the rectangle that's what I want.
 
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.065 seconds.