ERLEDIGT
NEIN
NEIN
ANTWORTEN
2
2
ZUGRIFFE
2340
2340
EMPFEHLEN
-
Hallo
Ich möchte in der Form frmPlayerMitChart ein animiertes Bitmap als Filter anzeigen. Allerdings bricht das Programm schon beim Konstruktor der Form mit einer OutOfVideoMemoryException ab. Ich benutze folgenden Code :
An diesem Punkt kommt die OutOfWideoMemoryException hoch.Ich weis aber nicht warum. Ich brauche dringend Hilfe.Code csharp:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
using DirectShowLib; // findet man unter :[url]http://sourceforge.net/projects/directshownet/[/url] using Microsoft.DirectX; using Microsoft.DirectX.Direct3D; Konstruktor: public frmPlayerMitChart() { InitializeComponent(); // We paint the windows ourself this.SetStyle(ControlStyles.UserPaint | controlStyles.AllPaintingInWmPaint, true); // Get the colorkeyed bitmap without antialiasing Bitmap bmp = new Bitmap(256, 256, PixelFormat.Format24bppRgb); // Bitmap alphabmp = new Bitmap(256, 256, PixelFormat.Format32bppArgb); Graphics g = Graphics.FromImage(bmp); // Do antialiased drawings g.SmoothingMode = SmoothingMode.AntiAlias; g.TextRenderingHint = TextRenderingHint.AntiAlias; // Clear the bitmap with complete transparency g.Clear(Color.Transparent);// // Draw serveral cicles with various Alpha values g.FillEllipse(violet25, 9, 9, 110, 110); g.DrawEllipse(blackBorder, 9, 9, 110, 110); g.DrawString("25%", font, text100, 40, 50); // Release GDI+ objects blackBorder.Dispose(); violet25.Dispose(); red50.Dispose(); green75.Dispose(); blue100.Dispose(); font.Dispose(); text100.Dispose(); g.Dispose(); // Basic Presentation Parameters... presentParams = new PresentParameters(); presentParams.Windowed = true; presentParams.SwapEffect = SwapEffect.Discard; // Assume a hardware Direct3D device is available // Add MultiThreaded to be safe. Each DirectShow filter runs in a separate thread... device = new Device( 0, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing | CreateFlags.MultiThreaded, presentParams ); ... }
Danke
Jens Leidel
-
Kannst du einschränken wo genau die Meldung kommt?
-
Ähnliche Themen
-
DirectShow Anfänger - Frage bzgl. Stream
Von Beatsteak im Forum .NET Grafik und SoundAntworten: 0Letzter Beitrag: 25.07.08, 08:47 -
application/octet-stream mit <embed> stream?
Von tobee im Forum HTML & XHTMLAntworten: 4Letzter Beitrag: 30.03.07, 13:21 -
Suche DirectShow-Filter zum CD auslesen
Von colblake im Forum Coders TalkAntworten: 0Letzter Beitrag: 15.07.05, 14:29 -
Live Stream Converter (Shoutcast Stream)?
Von plusfunenf im Forum Linux & UnixAntworten: 1Letzter Beitrag: 22.04.04, 14:45 -
DirectShow und Dev-C++ 4.9.8.3
Von ernii im Forum C/C++Antworten: 9Letzter Beitrag: 24.03.04, 10:16





Zitieren
Login





