About images convertion
-
Hello everybody! I'm a beginner developer in .Net and I need to know if I can convert Bitmaps to Metafiles in anyway. ( The Save method of the Image Class does´nt work beetwen vectorial images and pixelized images ). Advanced Thanks!:-D
I'm not totally sure if this will work (Graphics are not my strong point), but give it a shot:
System.Drawing.Bitmap b = new System.Drawing.Bitmap("filename.bmp"); System.IO.MemoryStream ms = new System.IO.MemoryStream(); b.Save(ms, System.Drawing.Imaging.ImageFormat.Wmf); System.Drawing.Imaging.Metafile m = new System.Drawing.Imaging.Metafile(ms);
I'm sure other people will have a better solution, but I think that will get you started. ;) HTH, Bill P. Oakland, CA -
I'm not totally sure if this will work (Graphics are not my strong point), but give it a shot:
System.Drawing.Bitmap b = new System.Drawing.Bitmap("filename.bmp"); System.IO.MemoryStream ms = new System.IO.MemoryStream(); b.Save(ms, System.Drawing.Imaging.ImageFormat.Wmf); System.Drawing.Imaging.Metafile m = new System.Drawing.Imaging.Metafile(ms);
I'm sure other people will have a better solution, but I think that will get you started. ;) HTH, Bill P. Oakland, CABe carefull by using this functions i thing that you are trying to convert an image form the raster format to vertor one so this prosess is not good to be done automatically you will get a file wich contain a data but not the correct data you want to deal with ... this converssion will produce a file with a point object for each pexile in the image so it is a meaningless information , i hoop that you cane use some softwares for degitizing like erdas or what ever.... the prove of my speaking that if you try that code you will get a WMF file but try to zoom in the picture you will get the pexiles rectangulars .... Mhmoud Rawas ------------ Software Eng.
-
Be carefull by using this functions i thing that you are trying to convert an image form the raster format to vertor one so this prosess is not good to be done automatically you will get a file wich contain a data but not the correct data you want to deal with ... this converssion will produce a file with a point object for each pexile in the image so it is a meaningless information , i hoop that you cane use some softwares for degitizing like erdas or what ever.... the prove of my speaking that if you try that code you will get a WMF file but try to zoom in the picture you will get the pexiles rectangulars .... Mhmoud Rawas ------------ Software Eng.