Hi i try to convert jpg to wmv using window media encoder when i running this code I get error "System.Runtime.InteropServices.COMException (0xC00D0BB8): The input media format is invalid." at line: SrcVid.SetInput(@"C:\Users\jacoba\Videos\Untitled.jpg", "", ""); any idea how to SetInput for jpg (or any others image - BMP, PNG etc. thanks, try { //get current folder string curentFolder = Directory.GetCurrentDirectory(); // Create a WMEncoder object. WMEncoder Encoder = new WMEncoder(); // Retrieve the source group collection. IWMEncSourceGroupCollection SrcGrpColl = Encoder.SourceGroupCollection; // Add a source group to the collection. IWMEncSourceGroup SrcGrp = SrcGrpColl.Add("SG_1"); IWMEncVideoSource2 SrcVid = (IWMEncVideoSource2)SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO); SrcVid.SetInput(@"C:\Users\jacoba\Videos\Untitled.jpg", "", ""); //Bitmap file (.bmp, …

Member Avatar
Member Avatar
+0 forum 3

I need to save a video as an image in silverlight, for my new webpage functionality, at [url]http://www.game4tress.com/ecardsender.aspx[/url]. Now, this would be easy in WPF, but seems that silverlight can't access the RenderTargetBitmap and BitmapEncoder. I was able to discover that RenderTargetBitmap can be replaced with WriteableBitmap, but i can't replace BitmapEncoder. If the function was made in WPF, i would use this code: [code] myCanvas.HorizontalAlignment=HorizontalAlignment.Stretch; int Height=(int)myCanvas.ActualHeight; int Width=(int)myCanvas.ActualWidth; RenderTargetBitmap bmp=new RenderTargetBitmap(Width,Height,96,96,PixelFormats.Pbgra32); bmp.Render(myCanvas); BitmapEncoder encoder=new JpegBitmapEncoder(); encoder.Frames.Add(BitmapFrame.Create(bmp)); using(System.IO.Stream stm=System.IO.File.Create("C:\\Temp.jpeg")) { encoder.Save(stm); stm.Dispose(); } [/code] I can't seem able to find an equivalent way out in Silverlight. Can you, please …

Member Avatar
+0 forum 0

i am working on an encoder nad i have developed a way to encode my message in terms of (x,y) coordinates..but i have to put these locations on a world map to strengthen my encoder.... im using dev c++ 4.9.9.2 and need a gui base coding for my c++ program and the mapping part..please help.

Member Avatar
Member Avatar
+0 forum 2

Hello, I desperately need a good and fast image encoder and/or compressor for files like jpeg or png. I need this for [B]internet image transfer[/B]. I have to transfer an images from server to client very fast - every second, even milisecond. I'm interested in an encorder that can [I]lower the quality and sets the compression of the image[/I]. I get screen images that are Bitmap, then write them using ImageIO to a ByteArrayOutputStream as [I]jpg[/I], [I]png[/I] or [I]gif[/I] and then send them. The transfer of the image is really slow :(. I don't need so much quality but I …

Member Avatar
+0 forum 0

The End.