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
Rajasekar S
NA
95
6.3k
How to convert eps file format to png file format ?
Aug 22 2018 12:24 AM
The following source code throws the out of memory exception.
public static void ConvertImageFromOneFormatToAnother()
{
try
{
string filePath = @"C:\Workings\Rajasekar\FUSO_XmlToHtml\FUSO_XmlToHtml\bin\Debug\SupportingFiles\TA_Images\DMT\Gr00\00008.eps"; ;
byte[] imageData;
// Create the byte array.
var originalImage = Image.FromFile(filePath);
using (var ms = new MemoryStream())
{
originalImage.Save(ms, ImageFormat.Jpeg);
imageData = ms.ToArray();
}
// Convert back to image.
using (var ms = new MemoryStream(imageData))
{
Image image = Image.FromStream(ms);
image.Save(@"C:\Users\rajasekars\Desktop\00008.png");
}
}
catch (Exception)
{
throw;
}
}
Reply
Answers (
2
)
How to became expert in .Net
how to response back result y in android with json format