TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
franches
NA
13
0
How to get dpi of image in .net
Apr 22 2005 9:16 PM
Hi, i really don't know if this is the right place to ask this question. i have this code void MenuOpenClick(object sender, System.EventArgs e) { if (openFileDialog.ShowDialog()==DialogResult.OK) { string directory = openFileDialog.FileName; textBox10.Text = Path.GetDirectoryName(directory); string filename = openFileDialog.FileName; textBox1.Text = Path.GetFileNameWithoutExtension(filename); textBox2.Clear(); textBox3.Clear(); textBox4.Clear(); textBox5.Clear(); textBox6.Clear(); textBox7.Clear(); textBox8.Clear(); textBox9.Clear(); buttonCreate.Enabled = false; Image image = Image.FromFile(openFileDialog.FileName); this.Text = String.Concat("Image Transformation (" + openFileDialog.FileName + ")"); int x = image.Size.Width; string xw = Convert.ToString(x); int y = image.Size.Height; string yh = Convert.ToString(y); textBox2.AppendText(xw); textBox3.AppendText(yh); pictureBox.Image=Image.FromFile(openFileDialog.FileName); .Show(p); adjustPictureBoxSize(); } }
my problem now is i don't know how to get the dpi of the image i opened. i would like to put it inside textbox10. hope someone could help me with the code. the type of images are tiff, jpeg, and bmp. thanks in advance.
Reply
Answers (
0
)
How do i create a mask(see post for details)?
I can't play with Datagrid ???