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
mike Delvotti
NA
262
0
Converting to byte from picturebox
Dec 7 2013 8:26 AM
Guys, I'm trying to save the image that was entered into my picturebox via open file dialog, but I get the below exception thrown?
'Object reference not set to an instance of an object.'
Below is my save code to save it back to the DB but clearly something is wrong or I'm not converting to byte array correctly?
MemoryStream stream = new MemoryStream();
logoPictureBox.Image.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg);
byte[] pic = stream.ToArray();
this.Validate();
this.companyBindingSource.EndEdit();
this.tableAdapterManager.UpdateAll(this.companyDetailsDataSet);
Reply
Answers (
1
)
how to genrate bar code in C#
Not able to call method