473,661 Members | 2,464 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Image cropping using mouse events

Hi,
I want to crop and save specified image area which is in a picturebox
with freehand using cursor, using mouseDown, mouseUp and mouseMove
events. How can crop an image with freehand (using mouse events of
course) within a picturebox control?

Thanks
Jan 18 '08 #1
2 3468
On Jan 18, 12:33 pm, kimiraikkonen <kimiraikkone.. .@gmail.comwrot e:
Hi,
I want to crop and save specified image area which is in a picturebox
with freehand using cursor, using mouseDown, mouseUp and mouseMove
events. How can crop an image with freehand (using mouse events of
course) within a picturebox control?

Thanks
The mouse events should be fairly easy to figure out (if not let me
know) so here's the GDI+ stuff you'll need:

http://www.bobpowell.net/changing_resolution.htm

Thanks,

Seth Rowe [MVP]
Jan 18 '08 #2
On Jan 18, 10:00 pm, rowe_newsgroups <rowe_em...@yah oo.comwrote:
On Jan 18, 12:33 pm, kimiraikkonen <kimiraikkone.. .@gmail.comwrot e:
Hi,
I want to crop and save specified image area which is in a picturebox
with freehand using cursor, using mouseDown, mouseUp and mouseMove
events. How can crop an image with freehand (using mouse events of
course) within a picturebox control?
Thanks

The mouse events should be fairly easy to figure out (if not let me
know) so here's the GDI+ stuff you'll need:

http://www.bobpowell.net/changing_resolution.htm

Thanks,

Seth Rowe [MVP]
Thanks Seth,
The code seems in C# however converted to VB.

I'll check this link out.
Jan 18 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3039
by: Roger Shrubber | last post by:
I have a page with images that the user can drag from one frame to another. I need them to see a "ghost image" of the image they are dragging, while the original stays put. I use the onmousemove event to keep the ghost image under the mouse pointer. There are three problems: (1) if the ghost image is dragged so it is partially off the edge of the screen, scrollbars appear. This not only looks bad, it can cause the page to autoscroll...
4
16201
by: Kenny | last post by:
I have been trying to write a script that will increase the size of and image when you mouse over it, and decrease it to original size, when you mouse out. After a couple of attempts, this is what I've come up with. In this example, there are 5 images (0 thru 4) all with a height of 80px. When you mouse over an image, it changes the growingImage variable equal to the number of the image you mouse over, when you mouse out, it sets it to 5,...
4
14712
by: Jay | last post by:
Hi, How can I capture mouse position on Image? I found number of script capturing mouse position of the page. But I could not find anything based on image. What I want to find out is X Y coordinates of mouse position. based on left of the top of my image is 0 0 (X Y coordinates) otherwise, I need to find out position of my image so I can calculate.
3
8459
by: ACaunter | last post by:
Hi there, I was wondering if there was a way to crop a peice of an ASP.Net Image, allowing the user to zoom in on only a section of the picture?? any help would be appreciated!! thanks -- AdamPC@hotmail.com
3
1580
by: Stimp | last post by:
I've been hacking at this for 15 mins, but haven't really got too much time to spend on it today, so maybe someone here can suggest a quick fix or suggest if there is a function built into asp.net that I could look at... Say I have an image that's 600 x 480 pixels and I want to create a new image which is cropped from this image to something like 100 x 80 pixels. The only problem is that the new image must show the full width of the
0
1948
by: AmerS | last post by:
hi, I have been trying to generate image patches for a training set but have not succeded yet. The only method i tried is cropping areas of the image and store the cropped images or patches as an array of bytes. The problem is, same patch gets stored thoughout the array, meaning its cropping the same area in the loop and the rectangle is not moving, could some one explain to me why, Thank You. heres the code: MemoryStream stream = new...
2
1781
by: kumari | last post by:
Hi, I am facing a problem with generation of thumbnail images in php. The requirement is as follows: the client would provide the image url, description, and content through a page. and the same information will be stored in database. While displaying all images i should take that url. and read it byte by byte and pass to a curl function where in it crops and echos.. the cropped version of image.
0
1930
by: David | last post by:
On Sun, May 4, 2008 at 5:28 PM, Valerio Valerio <vdv100@gmail.comwrote: I assume what you want to do is allow the user to drag the mouse across your desktop, and your program, running in the background, picks this up? As opposed to the user making a rectangular selection entirely within your app. I think the simplest way to do this is to capture the entire screen, then show it as an image on a window covering the entire screen (eg:...
1
9446
Thekid
by: Thekid | last post by:
Hi, I have an image similar to a clock, with numbers and letters going around in a circle. I need to extract the numbers and letters from the image and have them print out in a straight line and in order from inner circle working out. Here is an example of the image: http://img296.imageshack.us/my.php?image=screenimageqk9.jpg Since the characters in the image will be different each time I am starting with a screenshot, then I think I should...
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8855
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7364
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5653
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4179
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4346
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.