Windows Develop Bookmark and Share   
 index > Windows Forms General > Read .cgm image to a picturebox or convert it to bmp/wmf
 

Read .cgm image to a picturebox or convert it to bmp/wmf

Hi,
Wondering if anyone knows how i can read .cgm image to a picturebox or how to convert it into a bmp or wmf (or gif) file?

thnx
  • Moved byTaylorMichaelLMVPWednesday, October 07, 2009 1:24 PMWinForms related (From:Visual C# General)
  •  
imshz  Wednesday, October 07, 2009 12:22 PM
You'll need software that can decode the file format.  LeadTools can.

Hans Passant.
nobugz  Wednesday, October 07, 2009 12:44 PM
Hi imshz,

Using PictureBox to show the image you need to set the Image property of it. Therefore you need to create an instance of Image class. Image class offers some methods that let you create the image instance. For example: Image.FromFile, Image.FromStream. Bitmap and jpeg files are supported by the .NET. But .cgm may be not.

I think you’d better first convert the image file to the .NET supported file type and then create the Image instance. How to convert it to the .NET supported file type is beyond the support scope of this forum. You can either search it on the net or contact software vendor (cgm file reader tool or creator tool) for help.

Thank you for your understanding. If you have any other question, please feel free to tell me.

Sincerely,
Kira Qian
Send us any feedback you have about the help from MSFT at fbmsdn[At]microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework!
  • Marked As Answer byimshz Thursday, October 08, 2009 7:00 AM
  •  
Kira Qian  Thursday, October 08, 2009 6:19 AM
You'll need software that can decode the file format.  LeadTools can.

Hans Passant.
nobugz  Wednesday, October 07, 2009 12:44 PM
you dont know abount a cheeper tool, maybe a freeware?? (LeadTools Imaging costs $495)
imshz  Wednesday, October 07, 2009 12:48 PM
Freeware is only free is your time is free.  Which should give you plenty of time to Google for an alternative.  I only know of ImageMagick.

Hans Passant.
nobugz  Wednesday, October 07, 2009 2:45 PM
Hi imshz,

Using PictureBox to show the image you need to set the Image property of it. Therefore you need to create an instance of Image class. Image class offers some methods that let you create the image instance. For example: Image.FromFile, Image.FromStream. Bitmap and jpeg files are supported by the .NET. But .cgm may be not.

I think you’d better first convert the image file to the .NET supported file type and then create the Image instance. How to convert it to the .NET supported file type is beyond the support scope of this forum. You can either search it on the net or contact software vendor (cgm file reader tool or creator tool) for help.

Thank you for your understanding. If you have any other question, please feel free to tell me.

Sincerely,
Kira Qian
Send us any feedback you have about the help from MSFT at fbmsdn[At]microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework!
  • Marked As Answer byimshz Thursday, October 08, 2009 7:00 AM
  •  
Kira Qian  Thursday, October 08, 2009 6:19 AM

You can use google to search for other answers

Custom Search

More Threads

• using another form
• Closing application?
• How to detect which TreeNode was Double Clicked?
• BUG in VB.NET? Usercontrol and Enabled
• print lines and columns
• Help to make windows application like master page
• DataGridViewComboBoxColumn case sensitive
• XP System Icons Usage Restrictions/License
• Totaly noobish GUI question
• Download files from web browser