|
Dave Kreskowiak :how are you going to save you're image? Are you really going to try to write binary data to a text file??..yes .
ok look bro i have changed my saving code and used StreamWriter but its doesnt write binary data to a text file !!!! so when i opened the file the program doesnt display and of my drwaing ( line,ellipse,...)
PLZZZZ..MR DAVE..SEND ME BACK AS SOON AS U CAN..!!
Regards;
|
|
|
|
|
mr jets wrote: Are you really going to try to write binary data to a text file??..yes
Good luck with that!
BTW, the code you posted doesn't write ANYTHING to the file. All it does is open it. It doesn't even close the file when it's "done".
Seriously, you're missing a ton of basic knowledge you MUST have to build applications with.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
thanks for ur effort mr Dave..god bless u bro..but remember i said iam TRYING to save the pic by entering binary data to text ..but i couldnt .. ..i just can creat atext but it doesnt recieve any values...
comone ..i need ur help mr Dave !!
|
|
|
|
|
Well, I would start by never saving an image as a text file.
Next, have you looked as the Save[^] method on the Bitmap class.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
iam so greatfull for ur help mr Dave ..who said i wanna to save image ..okie i just wanna to save my drawings in picturebox (lines,ellips,...) so i can display it again ..like the Paint..
iam waiting ur reply...
Regards ;
|
|
|
|
|
If you can't get the Stream classes down, this is WAY over your head. Go back to the basics.
There's nothing that does this for you. You have to keep track of the mouse position, where the mouse buttons were held down and where it is now, drawing, calculating the circle, arc, whatever, drawing the new graphic to your bitmap, then updating the image displayed in the PictureBox, ...
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
my new save code is :
System.IO.FileStream fs = new System.IO.FileStream("c:\\testing.txt", System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite);
// create a stream writer
System.IO.StreamWriter sw = new System.IO.StreamWriter(fs, System.Text.Encoding.ASCII);
// write to file (buffer), where textbox1 is your text box
sw.Write("text");
// flush buffer (so the text really goes into the file)
sw.Flush();
// close stream writer and file
sw.Close();
fs.Close();
|
|
|
|
|
The Grand Negus wrote: That's how we do it.
Try asking me if I care, first.
Next, try opening your image format in any other "paint" application, like Photoshop. Good luck with your proprietary format. Once again, the rest of the world isn't good enough for you.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
The Grand Negus wrote: Enough to reply, it seems!
You just do this so you can get off pushing people buttons.
The Grand Negus wrote: We support copy, paste, import, and export operations across "systems".
I said open the file itself, not do some work around to paste it in somewhere else.
The Grand Negus wrote: Well, you're right about that. Is there nothing you'd like to see improved?
Everything needs improving. I just don't go running around telling the planet about every little thing that irks me and dumping my solutions on them.
Enough said.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
The Grand Negus wrote:
False.
True. You've left a healthy trail of evidence.
The Grand Negus wrote: seemed to think it was either impossible or impractical
Impossible - no. Impracticle, when the methods to save the image into industry standard formats already exist, most definitly, yes.
The Grand Negus wrote: It's not expected that every application should be able to open every other application's files.
Nope. Image files tend to be interchangable than most others though.
The Grand Negus wrote: Can you open a Word document in Paint Shop Pro?
Stay on topic. You know this is BS example.
The Grand Negus wrote: But why not?
Because I'm not a self-absorbed "I know better than you" schmuck like youself.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
good morning ..every one !
ok..i wanna to make aprograme that can draw(ellipse,lines,..) but i have aproblems with saving & opening file ..my save code is:
FileStream outStream=File.Create(saveFileDialog1.FileName);//To create text file
StreamWriter streamWriter=new StreamWriter(outStream);
the error...>>(cannot implicity convert type 'System.IO.StreamWritet'to 'System.IO.Stream'.
plzz send me back...as fast as u can
Regards;
|
|
|
|
|
What you need to do is convert your shapes into a binary format. You can the deserialize them back into the original shapes. Here's some code to try.
//Serialize the shapes before saving
FileStream fs = File.Create(strFileName);
BinaryFormatter bf = new BinaryFormatter();
bf.Serialize(fs, myArray);
fs.Close();
//Deserialize the saved shapes
FileStream fs = File.Open(strFileName, FileMode.Open);
BinaryFormatter bf = new BinaryFormatter();
myArray = (ArrayList)bf.Deserialize(fs, null);
fs.Close();
Cheers!
Richard
may your code be error free
|
|
|
|
|
Dear Richard ..thanks for ur interest man..but finally i wrote acode that can save the file at C Drive as atext but while opening the program can read the data from text..but it cant display it ..this valid while drawing LINES ONLY..my problem is:
--------> how can i make the program display the file ( draw the lines..) & how can i do that for ellipse & polygons.
this apart of my code :
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using System.Data;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Serialization;
namespace graphics_practis
{
///
/// Summary description for Form1.
///
public class Form1 : System.Windows.Forms.Form
{
Point center,radius,v,start,end,a,b;
ArrayList arraypoint=new ArrayList();
ArrayList arraylist_points=new ArrayList();
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button line;
private System.Windows.Forms.Button square;
private System.Windows.Forms.Button circle;
private System.Windows.Forms.Button ellipse;
private System.Windows.Forms.Button polygon;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button ok;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.MenuItem menuItem4;
private System.Windows.Forms.MenuItem menuItem5;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.SaveFileDialog saveFileDialog1;
private BinaryFormatter formtter = new BinaryFormatter();
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
dr = new draw(this.pictureBox1);
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.panel1 = new System.Windows.Forms.Panel();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.line = new System.Windows.Forms.Button();
this.square = new System.Windows.Forms.Button();
this.circle = new System.Windows.Forms.Button();
this.ellipse = new System.Windows.Forms.Button();
this.polygon = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.ok = new System.Windows.Forms.Button();
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItem4 = new System.Windows.Forms.MenuItem();
this.menuItem5 = new System.Windows.Forms.MenuItem();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.BackColor = System.Drawing.SystemColors.MenuText;
this.panel1.Controls.Add(this.pictureBox1);
this.panel1.Location = new System.Drawing.Point(96, 32);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(416, 296);
this.panel1.TabIndex = 0;
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.SystemColors.Window;
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(416, 296);
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
this.pictureBox1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseUp);
this.pictureBox1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseMove);
this.pictureBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseDown);
//
// line
//
this.line.Location = new System.Drawing.Point(24, 32);
this.line.Name = "line";
this.line.Size = new System.Drawing.Size(40, 23);
this.line.TabIndex = 1;
this.line.Text = "line";
this.line.Click += new System.EventHandler(this.line_Click);
//
// square
//
this.square.Location = new System.Drawing.Point(24, 72);
this.square.Name = "square";
this.square.Size = new System.Drawing.Size(40, 23);
this.square.TabIndex = 2;
this.square.Text = "square";
this.square.Click += new System.EventHandler(this.square_Click);
//
// circle
//
this.circle.Location = new System.Drawing.Point(24, 120);
this.circle.Name = "circle";
this.circle.Size = new System.Drawing.Size(48, 23);
this.circle.TabIndex = 3;
this.circle.Text = "circle";
this.circle.Click += new System.EventHandler(this.circle_Click);
//
// ellipse
//
this.ellipse.Location = new System.Drawing.Point(24, 168);
this.ellipse.Name = "ellipse";
this.ellipse.Size = new System.Drawing.Size(56, 23);
this.ellipse.TabIndex = 4;
this.ellipse.Text = "ellipse";
this.ellipse.Click += new System.EventHandler(this.ellipse_Click);
//
// polygon
//
this.polygon.Location = new System.Drawing.Point(16, 216);
this.polygon.Name = "polygon";
this.polygon.Size = new System.Drawing.Size(56, 23);
this.polygon.TabIndex = 5;
this.polygon.Text = "polygon";
this.polygon.Click += new System.EventHandler(this.polygon_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(8, 264);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(40, 20);
this.textBox1.TabIndex = 6;
this.textBox1.Text = "";
//
// ok
//
this.ok.Location = new System.Drawing.Point(48, 264);
this.ok.Name = "ok";
this.ok.Size = new System.Drawing.Size(32, 23);
this.ok.TabIndex = 7;
this.ok.Text = "ok";
this.ok.Click += new System.EventHandler(this.ok_Click);
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1});
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem2,
this.menuItem3,
this.menuItem4,
this.menuItem5});
this.menuItem1.Text = "File";
//
// menuItem2
//
this.menuItem2.Index = 0;
this.menuItem2.Text = "New";
//
// menuItem3
//
this.menuItem3.Index = 1;
this.menuItem3.Text = "Open";
this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
//
// menuItem4
//
this.menuItem4.Index = 2;
this.menuItem4.Text = "Save";
this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click);
//
// menuItem5
//
this.menuItem5.Index = 3;
this.menuItem5.Text = "Exit";
this.menuItem5.Click += new System.EventHandler(this.menuItem5_Click);
//
// button1
//
this.button1.Location = new System.Drawing.Point(192, 344);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(192, 32);
this.button1.TabIndex = 8;
this.button1.Text = "Change Text Color";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(192, 384);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(192, 32);
this.button2.TabIndex = 9;
this.button2.Text = "Change Background Color";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(528, 445);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.ok);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.polygon);
this.Controls.Add(this.ellipse);
this.Controls.Add(this.circle);
this.Controls.Add(this.square);
this.Controls.Add(this.line);
this.Controls.Add(this.panel1);
this.Menu = this.mainMenu1;
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
#region variables
Graphics g ;
Pen p = new Pen(Color.Black,1);
ArrayList lines = new ArrayList();
ArrayList squeres = new ArrayList();
ArrayList circles = new ArrayList();
ArrayList ellipses = new ArrayList();
ArrayList polygons = new ArrayList();
int drawwhat;
int n ;//for the No. of polygon
draw dr;
#endregion
#region mouse down
private void pictureBox1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
start.X = e.X;
start.Y = e.Y;
arraylist_points.Add(start);
}
#endregion
#region mouse move
private void pictureBox1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
g = pictureBox1.CreateGraphics();
if(e.Button == MouseButtons.Left)
{
refresh();
DrawReq(new Point(e.X,e.Y));
}
}
#endregion
#region mouse_up
private void pictureBox1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(e.Button == MouseButtons.Left)
{
end.X = e.X;
end.Y = e.Y;
DrawReq();
arraylist_points.Add(end);
}
}
#endregion
#region FormLoad
private void Form1_Load(object sender, System.EventArgs e)
{
Bitmap bmp =
new Bitmap(pictureBox1.Width,
pictureBox1.Height);
pictureBox1.BackgroundImage = bmp;
g = Graphics.FromImage(bmp);
g.Clear(pictureBox1.BackColor);
}
#endregion
private void line_Click(object sender, System.EventArgs e)
{
drawwhat = 1;
}
#region Drawwhat
private void DrawReq()
{
if(drawwhat == 1)
{
dr.line(p,start,end);
Line l = new Line();
l.Pen = p;
l.First = start;
l.Second = end;
lines.Add(l);
l = null;
}
else if(drawwhat == 2)
{
dr.square(new Pen(Color.Black,1),start,end);
Line l = new Line();
l.Pen = p;
l.First = start;
l.Second = end;
squeres.Add(l);
l = null;
}
else if(drawwhat == 3)
{
dr.circle(p,start,end);
Line l = new Line();
l.Pen = p;
l.First = start;
l.Second = end;
circles.Add(l);
l = null;
}
else if(drawwhat == 4)
{
dr.ellipse(p,start,end);
Line l = new Line();
l.Pen = p;
l.First = start;
l.Second = end;
ellipses.Add(l);
l = null;
}
else if (drawwhat == 5 && n!=0)
{
dr.polygon(n,p,start,end);
Polygon np = new Polygon();
np.Pen = p;
np.First = start;
np.Second = end;
np.n = n;
polygons.Add(np);
np = null;
}
}
//______________________________________________________________
private void DrawReq(Point last)// overloading to draw during moving
{
end = last;
if(drawwhat == 1)
{
dr.line(p,start,end);
}
else if(drawwhat == 2)
{
dr.square(p,start,end);
}
else if(drawwhat == 3)
{
dr.circle(p,start,end);
}
else if(drawwhat == 4)
{
dr.ellipse(p,start,end);
}
else if (drawwhat == 5)
{
dr.polygon(n,p,start,end);
}
}
//________________________________________________________________
//________________________________________________________________
#endregion
#region Refresh
private void refresh()
{
pictureBox1.Refresh();
foreach(Line l in lines)
{
dr.line(l.Pen,l.First,l.Second);
}
foreach(Line l in squeres)
{
dr.square(l.Pen,l.First,l.Second);
}
foreach(Line l in circles)
{
dr.circle(l.Pen,l.First,l.Second);
}
foreach(Line l in ellipses)
{
dr.ellipse(l.Pen,l.First,l.Second);
}
foreach(Polygon p in polygons)
{
dr.polygon(p.n,p.Pen,p.First,p.Second);
}
}
#endregion
private void square_Click(object sender, System.EventArgs e)
{
drawwhat = 2;
}
private void circle_Click(object sender, System.EventArgs e)
{
drawwhat = 3;
}
private void pictureBox1_Click(object sender, System.EventArgs e)
{
}
private void ellipse_Click(object sender, System.EventArgs e)
{
drawwhat = 4;
}
private void polygon_Click(object sender, System.EventArgs e)
{
drawwhat = 5;
}
private void ok_Click(object sender, System.EventArgs e)
{
try
{
n = int.Parse(textBox1.Text.ToString());
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void menuItem4_Click(object sender, System.EventArgs e)
{
// save the file
string str_Line;
System.IO.FileStream fs = new System.IO.FileStream("c:\\graphics.txt", System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite);
StreamWriter streamWriter=new StreamWriter(fs);
if(drawwhat==1)
{
for(int j=0;j
|
|
|
|
|
Hello...
i need to split the forms to two screens show..
like one window wolla start at the main screen and any given time other windows pop up at second screen...
Thanks...
Shimon
|
|
|
|
|
What language are you using ? .NET languages have a Screen.AllScreens enum that gives you the bounds of all your screens, so it's trivial to position windows in them.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
guys u really doing agreat work..okie i just wanna to make color eraser ..like that one in Paint by c#..i didnt find it in deitel (it sucks).i can understand the code but i cant creat it .
fellas dont late for me..iam stuck..
Best Regards
|
|
|
|
|
The eraser is just drawing a thick line in the background color. Pretty easy stuff. Which bit are you stuck on ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hello fellas ..was up!! any way my program like that on in Paint ( drawing line,ellipse..) but i dont know how to Zoom in/out the pic ..plzz answer me as fast as u can.. cuz iam stuck..
iam using M.V.S.NET version 2oo3 /c# !!
Best Regards
|
|
|
|
|
Try this article: Simple Zoom.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Hi, we're a couple of students on our internship, and we're kinda stuck in the project we're doing. I'll first try to explain what it is we are expected to make.
You have to imagine a white empty 2D paper which is virtually unlimited in size. An admin can place a question on this paper, users can then reply on the active question. The admin can also zoom in and zoom out and drag the paper around and post new questions. So we have to work with an environment that contains a fair amount of questions linked to answers. Every question can be differently scaled, so this means that you have to zoom in more on some questions than others.
Basic functionality would have to be panning the paper, by that I mean hold mouse down and dragging it to another position, thus moving all objects on the paper in that direction.
We've tried this with the following code, however the performance was really bad.
void Window_MouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)<br />
{<br />
if (mbMouseDown)<br />
{<br />
Point bNew = e.GetPosition(Window);<br />
foreach (UIElement oObject in LayoutRoot.Children)<br />
{<br />
Canvas.SetTop(oObject, bNew.X - mpBegin.X);<br />
Canvas.SetLeft(oObject, bNew.Y - mpBegin.Y);<br />
}<br />
}<br />
mbMouseDown = false;<br />
}<br />
<br />
void LayoutRoot_MouseMove(object sender, System.Windows.Input.MouseEventArgs e)<br />
{<br />
if (mbMouseDown)<br />
{<br />
Point bNew = e.GetPosition(Window);<br />
foreach (UIElement oObject in LayoutRoot.Children)<br />
{<br />
Canvas.SetTop(oObject, bNew.X - mpBegin.X);<br />
Canvas.SetLeft(oObject, bNew.Y - mpBegin.Y);<br />
}<br />
}<br />
}<br />
<br />
void LayoutRoot_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)<br />
{<br />
mbMouseDown = true;<br />
mpBegin = e.GetPosition(Window);<br />
}
With the zooming we tried the scaling functionality of wpf.
private void Window_MouseWheel(object sender, MouseWheelEventArgs e)<br />
<br />
{<br />
<br />
if (e.Delta > 0)<br />
<br />
{<br />
<br />
mpScaleSize = new Point((mpScaleSize.X - 0.05), (mpScaleSize.Y - 0.05));<br />
<br />
grdCanvas.LayoutTransform = new ScaleTransform(mpScaleSize.X, mpScaleSize.Y);<br />
<br />
zoomX.Content = mpScaleSize.X.ToString();<br />
<br />
zoomY.Content = mpScaleSize.Y.ToString();<br />
<br />
}<br />
<br />
else<br />
<br />
{<br />
<br />
mpScaleSize = new Point((mpScaleSize.X + 0.05), (mpScaleSize.Y + 0.05));<br />
<br />
grdCanvas.LayoutTransform = new ScaleTransform(mpScaleSize.X, mpScaleSize.Y);<br />
<br />
zoomX.Content = mpScaleSize.X.ToString();<br />
<br />
zoomY.Content = mpScaleSize.Y.ToString();<br />
<br />
}<br />
<br />
}
This again wasn't going smoothly.
(My laptop is a IBM Thinkpad r50p, 1,7Ghrz Centrino, 1gig RAM, maybe it's just not fast enough?)
Anyway , I've posted this same question on the msdn forums. One person with little experience with the subject suggested me that I should try to work with visualBrushes and use it as some kind of view. I've been playing around with the VisualBrushes for a while now.
I've managed to get controls from code onto the VisualBrush(which is on a rectangle in the center of my app), however working with VisualBrush as some kind of view isn't working for me.What I "discovered"is that working with the viewbox property of the visualbrush might be the solution, but I can't seem to get it to work.
To my understanding the viewbox is a rectangle with it's x & y as panning values, and it's with & height as crop/stretch values (zoom).
Anyone with some experience in the area, I would really appreciate the help.
Thanks,
Tobias
-- modified at 8:14 Tuesday 24th April, 2007
|
|
|
|
|
I am working on a drawing application using OpenGl and C#. I want to use the whole form as Drawing area, i have added menus to my application but these menus does not show at run time, help required
thanks
David
david
|
|
|
|
|
Hi
I want to do some limited filters on an image (like converting RGB to MonoColor)
I do this now by to inner loop on image scales and use GetPixel method on this but it's real Slow.
Who can help me to do that with realtime speed (like Adobe Photoshop).
Tanx
|
|
|
|
|
Christian Graus has written a very good set of articles describing image processing with C#. Yo ucan find them here[^] under the GDI+ section.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Thanks for the plug, mate
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
After Mark Salsbery showed me the wonders of DirectShow Editing Services (Thanks Mark!) i was able to take a bunch of mpegs, put them on after the other and add background music and save the output to an avi file.
One problem. I am having problems Compressing it. The output file is huge since i am not compressing it.
The following example from the DirectShow documentation shows this:
long NumGroups;
pTimeline->GetGroupCount(&NumGroups);
// Loop through the groups and get the output pins.
for (i = 0; i < NumGroups; i++)
{
IPin *pPin;
if (pRender->GetGroupOutputPin(i, &pPin) == S_OK)
{
IBaseFilter *pCompressor;
// Create a compressor filter. (Not shown.)
// Set compression parameters. (Not shown.)
// Connect the pin.
pBuilder->RenderStream(NULL, NULL, pPin, pCompressor, pMux);
pCompressor->Release();
pPin->Release();
}
}
They do not show how to create a compression filter. So meanwhile my compressor is NULL, this is why my output is so huge.
Anyone have any idea how to create a compressor filter? Show me some code xample?
Thanks,
Michael
mjmimmm@hotmail.com
|
|
|
|
|