Hi,
I have JPG file and I would like to have it as a PNG. So if there is a way to convert this JPG to PNG while opening the file?
Best Regards & Thanks in advance.
Here is my sample code:
//Load the Image
Bitmap bmpImage = new Bitmap(Openfile.FileName);
My_Image = new Emgu.CV.Image(bmpImage);

Raja TRank #685 · 3.5K reputationPosted Jul 13, 2015, 6:48 AM EDT
Please refer below URLs
http://stackoverflow.com/questions/17294737/converting-an-image-to-png-on-upload
http://stackoverflow.com/questions/3906260/how-can-i-convert-a-jpeg-image-to-a-png-one-with-transparent-background
http://www.c-sharpcorner.com/UploadFile/scottlysle/ImageConverter09132006105604AM/ImageConverter.aspx
Thanks
Santiago Felipe2 reputationPosted Jul 23, 2015, 5:02 AM EDT
Are you selecting and loading the JPEG image using the OpenFileDialog Class?
If yes, you can get the name of the JPEG file, pass it Image.FromFile method:
https://msdn.microsoft.com/en-us/library/system.drawing.image.fromfile.aspx
And then save it to PNG using the
Image.Save method (Stream, ImageFormat):
https://msdn.microsoft.com/en-us/library/ms142147.aspx
But if you face any problem while loading or saving the JPEG or PNG images, you can try using loading and saving features from leadtools programming toolkit.