473,513 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Image processing applications

2 New Member
I'm having some problems with the coding I found online. Currently I'm doing the cropping application on an image by using C#. I encounter many errors when debugging. Here's my codes,

private void cropToolStripMenuItem_Click(object sender, EventArgs e) //start typing code after double clicking on windows form1

public partial class CropForm : Form
{

public CropForm()
{
InitializeComponent();
btnOK.DialogResult = DialogResult.OK;
btnCancel.DialogResult = DialogResult.Cancel;
}


public int CropXPosition
{
get
{
if (string.IsNullOrEmpty(txtX.Text))
txtX.Text = "0";
return Convert.ToInt32(txtX.Text);
}
set { txtX.Text = value.ToString(); }
}

public int CropYPosition
{
get
{
if (string.IsNullOrEmpty(txtY.Text))
txtY.Text = "0";
return Convert.ToInt32(txtY.Text);
}
set { txtY.Text = value.ToString(); }
}

public int CropWidth
{
get
{
if (string.IsNullOrEmpty(txtWidth.Text))
txtWidth.Text = "0";
return Convert.ToInt32(txtWidth.Text);
}
set { txtWidth.Text = value.ToString(); }
}

public int CropHeight
{
get
{
if (string.IsNullOrEmpty(txtHeight.Text))
txtHeight.Text = "0";
return Convert.ToInt32(txtHeight.Text);
}
set { txtHeight.Text = value.ToString(); }
}
}
}

Please help and do correct me. Thank you.
Dec 10 '10 #1
2 2504
GaryTexmo
1,501 Recognized Expert Top Contributor
In the future, please put your code in CODE tags. You can do this by highlighting the appropriate text and clicking the "#" button in the editor.

Can you please be more descriptive of what the problem is? Looking at the code all you have there is is get-set properties defined. Where are you trying the actual crop? I copied and pasted what you wrote in and it compiles fine.

Please elaborate further on what the problem is.
Dec 10 '10 #2
Miss Tan
2 New Member
The errors I encountered when coding the crop application after double clicking on the 'Form1' was 'btnOK, txtX,txtY' and so on does not exist in current context. What does that suppose to mean? What does it mean by current context? Please help. Thank you.
Dec 27 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
4071
by: Alexandre Fayolle | last post by:
Hello, I'm about to start a project which will involve some greyscale image processing using morphological operators (erosion, dilation, distance transforms...), and I was wondering if these...
0
1420
by: Andreas Håkansson | last post by:
Hiya! I'm currently looking for a good image processig component (classes) to use in a project. I do not want to controls (winform or webform) since I will be doing this with code. I actually...
2
1721
by: Maxwell2006 | last post by:
Hi, I am developing a simple image upload asp.net page and I am looking for a simple image processing component to be able to change the image resolution of jpg images and also reduce the...
10
4402
by: stonny | last post by:
Hi, I am converting my matlab program into C/C++. I need to change some image processing toolbox functions into C/C++, such as edge detection, mathematical morphology. Is there any place that I...
1
2886
by: stonny | last post by:
Hi, I am converting my matlab program into C. I need to change some image processing toolbox functions into C, such as edge detection, mathematical morphology. Since I am not very comfortable with...
5
2364
by: edurand | last post by:
Hi, We are are pleased to announce the version 3.0 of the image processing library 'Filters'. You can use it in Python, and we have provided tutorials and samples in Python, with for exemple...
3
2539
by: birensubudhi | last post by:
hey guys,can anyone tell me what is image processing, how to do it using C. IN KSHITIJ 2007 held at IIT kgp a que by INFOSYS is asked, they hav given an image then cut in different orientation...
26
5254
by: mohangupta13 | last post by:
can anyone help me where to find the best image processing library for c++ mohan gupta
5
1994
by: whisk3rs | last post by:
Hello, I have a conceptual question. I need to write a program that will take as input a list of images and then process each image individually (extract useful features from the image) ...
0
2001
by: tavares | last post by:
(Our apologies for cross-posting. We appreciate if you kindly distribute this information by your co- workers and colleagues.) ...
0
7260
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,...
0
7384
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,...
0
7537
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7525
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...
1
5086
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3233
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...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
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...

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.