home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
HTPC Projects
Hardware
Ambient Lighting System
AtmoLight - Plugin Improvement discussion
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="BassFan" data-source="post: 1079277"><p>[CODE=C#]+- GraphicsStream stream = SurfaceLoader.SaveToStream(ImageFileFormat.Bmp, rgbSurface);</p><p> 86 +- Bitmap b = new Bitmap(Image.FromStream(stream));</p><p> 87 ++ int pitch;</p><p> 88 ++ GraphicsStream stream = rgbSurface.LockRectangle(LockFlags.Discard, out pitch);</p><p> 89 ++ Bitmap b = new Bitmap(rgbSurface.Description.Width,rgbSurface.Description.Height, pitch, System.Drawing.Imaging.PixelFormat.Format32bppArgb, stream.InternalData);</p><p> 90</p><p>[/CODE]</p><p> </p><p>Frage mich gerade was du hier machst?</p><p>Warum definierst du zweimal b aber tust nichts damit?</p><p>abgesehen von return b.. welches b denn nun?</p><p> </p><p>Das erste scheint mir zumindest ein dickes Speicherleck zu sein.</p><p>Hier erstellst du ein Bitmap verwendest es aber anschließend nicht</p><p>und Freigegeben wird es auch nicht bevor du ein neues Bitmap erstellst (ebenfalls mit b definierst)</p><p> </p><p>Hmmm... überdenk das nochmal.</p><p> </p><p>gruss</p></blockquote><p></p>
[QUOTE="BassFan, post: 1079277"] [CODE=C#]+- GraphicsStream stream = SurfaceLoader.SaveToStream(ImageFileFormat.Bmp, rgbSurface); 86 +- Bitmap b = new Bitmap(Image.FromStream(stream)); 87 ++ int pitch; 88 ++ GraphicsStream stream = rgbSurface.LockRectangle(LockFlags.Discard, out pitch); 89 ++ Bitmap b = new Bitmap(rgbSurface.Description.Width,rgbSurface.Description.Height, pitch, System.Drawing.Imaging.PixelFormat.Format32bppArgb, stream.InternalData); 90 [/CODE] Frage mich gerade was du hier machst? Warum definierst du zweimal b aber tust nichts damit? abgesehen von return b.. welches b denn nun? Das erste scheint mir zumindest ein dickes Speicherleck zu sein. Hier erstellst du ein Bitmap verwendest es aber anschließend nicht und Freigegeben wird es auch nicht bevor du ein neues Bitmap erstellst (ebenfalls mit b definierst) Hmmm... überdenk das nochmal. gruss [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
HTPC Projects
Hardware
Ambient Lighting System
AtmoLight - Plugin Improvement discussion
Contact us
RSS
Top
Bottom