-
February 7th, 2009, 06:34 AM
#1
Creating an Image Editor Application
Hello all,
I want to create an application for Image Editor. I've created a simple Image Editor, like ms.Paint with less features, only can draw rectangle, line, and ellips, erase things, etc, and no canvas (u can draw everywhere on form.
I want to create a new one, which able to do more, like using canvas, there's layers, able to insert image,etc.
There is a lot of questions I wanna ask.
First of all, I found out that C# has Canvas class, how to use it ?
I'm using this code :
private void Editor_Load(object sender, EventArgs e)
{
Canvas myCanvas = new Canvas();
myCanvas.Width = 500;
myCanvas.Height = 200;
myCanvas.VerticalAlignment = System.Windows.VerticalAlignment.Top;
myCanvas.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
}
There is nothing happened. Are there is anyway to create Canvas with tools ? If there isn't, please anyone tell me how to use canvas..
and also, are we able to draw on canvas ?
-
February 7th, 2009, 07:41 AM
#2
Re: Creating an Image Editor Application
you can use Bitmap with one of its constructors for (width/ height) as canvas.
cosider this code example:
Code:
private void button3_Click(object sender, EventArgs e)
{
Image img = CreatePicture();
pictureBox1.Image = img;
}
private Image CreatePicture()
{
// Create a new Bitmap object, 50 x 50 pixels in size
Image canvas = new Bitmap(50, 50);
// create an object that will do the drawing operations
Graphics artist = Graphics.FromImage(canvas);
// draw a few shapes on the canvas picture
artist.Clear(Color.Lime);
artist.FillEllipse(Brushes.Red, 3, 30, 30, 30);
artist.DrawBezier(new Pen(Color.Blue, 3), 0, 0, 40, 15, 10, 35, 50, 50);
artist.Dispose();
return canvas;
}
Please rate my post if it was helpful for you. Java, C#, C++, PHP, ASP.NET
SQL Server, MySQL
DirectX
MATH Touraj Ebrahimi
[toraj_e] [at] [yahoo] [dot] [com]
-
February 7th, 2009, 09:14 AM
#3
Re: Creating an Image Editor Application
@toraj58 :
Thanks for your reply,man .. I'm working on it right now..I'll ask again if I have questions..thanks..
-
February 9th, 2009, 11:45 AM
#4
Re: Creating an Image Editor Application
if you had problem using it let me know so i will give you more detail information and write more sample for you.
Please rate my post if it was helpful for you. Java, C#, C++, PHP, ASP.NET
SQL Server, MySQL
DirectX
MATH Touraj Ebrahimi
[toraj_e] [at] [yahoo] [dot] [com]
-
February 9th, 2009, 12:02 PM
#5
Re: Creating an Image Editor Application
Hi toraj58, are there any possible way to create a simple image editor which works on web using ASP.Net ?
-
February 9th, 2009, 12:29 PM
#6
Re: Creating an Image Editor Application
yes, it is possible if you also combine it with AJAX or write an ActiveX for it.
Please rate my post if it was helpful for you. Java, C#, C++, PHP, ASP.NET
SQL Server, MySQL
DirectX
MATH Touraj Ebrahimi
[toraj_e] [at] [yahoo] [dot] [com]
-
February 9th, 2009, 12:52 PM
#7
Re: Creating an Image Editor Application
are there any example of doing those things?
like creating canvas or draw line using mouse or draw shape..
anything may helps..
-
February 9th, 2009, 01:08 PM
#8
Re: Creating an Image Editor Application
yes there are. you can search google.
also there are good books about GDI+ that learn you everything about it.
also there are some articles in codeproject site; go and search there.
also for simple issues like how to draw line, curve, shapes you can search in the MSDN.
for specific problems ask here you could not accomplish something.
Please rate my post if it was helpful for you. Java, C#, C++, PHP, ASP.NET
SQL Server, MySQL
DirectX
MATH Touraj Ebrahimi
[toraj_e] [at] [yahoo] [dot] [com]
-
February 9th, 2009, 01:33 PM
#9
Re: Creating an Image Editor Application
Codeproject, sounds great..
I'll check that site..
Thanks for replying me all along man,
for the info..
i'll ask here again to let u know if there's problem.
-
February 9th, 2009, 03:48 PM
#10
Re: Creating an Image Editor Application
Please rate my post if it was helpful for you. Java, C#, C++, PHP, ASP.NET
SQL Server, MySQL
DirectX
MATH Touraj Ebrahimi
[toraj_e] [at] [yahoo] [dot] [com]
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|