<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>MicrosoftDwayneNeed Forum Rss Feed</title><link>http://www.codeplex.com/MicrosoftDwayneNeed/Thread/List.aspx</link><description>MicrosoftDwayneNeed Forum Rss Description</description><item><title>New Post: Thank you</title><link>http://microsoftdwayneneed.codeplex.com/discussions/444460</link><description>&lt;div style="line-height: normal;"&gt;Awesome, sounds like a great use of this technique.&lt;br /&gt;
&lt;/div&gt;</description><author>DwayneNeed</author><pubDate>Tue, 21 May 2013 16:51:09 GMT</pubDate><guid isPermaLink="false">New Post: Thank you 20130521045109P</guid></item><item><title>New Post: Thank you</title><link>http://microsoftdwayneneed.codeplex.com/discussions/444460</link><description>&lt;div style="line-height: normal;"&gt;Dwayne,&lt;br /&gt;
&lt;br /&gt;
I know the original post on multi UI threads is six years old, but it really saved me some headaches when I needed to show a busy indicator while a third-party control had the main UI thread tied-up in a way I couldn't offload to a background worker.&lt;br /&gt;
&lt;br /&gt;
Just wanted to say thanks for a very useful piece of code.&lt;br /&gt;
&lt;/div&gt;</description><author>cwford</author><pubDate>Tue, 21 May 2013 16:38:40 GMT</pubDate><guid isPermaLink="false">New Post: Thank you 20130521043840P</guid></item><item><title>New Post: Running background video</title><link>http://microsoftdwayneneed.codeplex.com/discussions/438882</link><description>&lt;div style="line-height: normal;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Audio_Video_Interleave" rel="nofollow"&gt;AVI&lt;/a&gt; is just a container format.  The video stream inside of it can be in virtually any format, including Full Frame (Uncompressed), Intel Real Time (Indeo), Cinepak, Motion JPEG, Editable MPEG, VDOWave, ClearVideo / RealVideo, QPEG, and MPEG-4 Video.&lt;br /&gt;
&lt;br /&gt;
I'm not certain the codec is the problem.  It might simply be that the video is too large, or that the WPF app is using software rendering for some reason.&lt;br /&gt;
&lt;/div&gt;</description><author>DwayneNeed</author><pubDate>Thu, 04 Apr 2013 19:43:52 GMT</pubDate><guid isPermaLink="false">New Post: Running background video 20130404074352P</guid></item><item><title>New Post: Running background video</title><link>http://microsoftdwayneneed.codeplex.com/discussions/438882</link><description>&lt;div style="line-height: normal;"&gt;Hi thanks for the reply.&lt;br /&gt;
&lt;br /&gt;
The video I am running is at HD 1920 by 1080 resolution, in Avi format and it's 12.2MB.  I will try different codecs.  But how do i know what codec is it running in wpf?&lt;br /&gt;
&lt;br /&gt;
Thanks!&lt;br /&gt;
&lt;/div&gt;</description><author>icube</author><pubDate>Thu, 04 Apr 2013 06:39:34 GMT</pubDate><guid isPermaLink="false">New Post: Running background video 20130404063934A</guid></item><item><title>New Post: Running background video</title><link>http://microsoftdwayneneed.codeplex.com/discussions/438882</link><description>&lt;div style="line-height: normal;"&gt;WPF already decodes video on separate threads, so that is why you did not see any advantage.&lt;br /&gt;
&lt;br /&gt;
Is the video running at full resolution?  That might be pretty heavy regardless.  Try using a lower-resolution video if it is just for background effects.&lt;br /&gt;
&lt;br /&gt;
Try different codecs.  The degree of GPU acceleration differs depending on the codec.&lt;br /&gt;
&lt;br /&gt;
Is your app using layered windows (semi-transparent)?  If so, we have to read the video memory into system memory which is pretty expensive.&lt;br /&gt;
&lt;br /&gt;
Are you using software rendering?  That can be very expensive.  WPF can render in hardware (GPU assist) and it also supports in rendering on the CPU.  The CPU us much more expensive.  Perhaps your app is rendering in software?  You can force software rendering, but you cannot force hardware rendering.  WPF uses hardware rendering if it thinks the GPU is supported (and it has not been forced to use software).&lt;br /&gt;
&lt;br /&gt;
Good luck!&lt;br /&gt;
&lt;/div&gt;</description><author>DwayneNeed</author><pubDate>Wed, 03 Apr 2013 19:19:58 GMT</pubDate><guid isPermaLink="false">New Post: Running background video 20130403071958P</guid></item><item><title>New Post: Running background video</title><link>http://microsoftdwayneneed.codeplex.com/discussions/438882</link><description>&lt;div style="line-height: normal;"&gt;Hi, I've a touch screen application built using WPF running at HD resolution (1920 x 1080) and i have a looping background video that is also in HD. The background video runs as long as the lifetime of the app. The UI is placed &amp;quot;above&amp;quot; (in z order). However the UI's rendering seems jerky and laggy and I want to improve this performance. I tried using the VisualWrapper in my app to run the video in the wish to run the video in another thread however, the result is still the same, i still face jerkiness and lagging. When i run the app without the video running, my UI runs smoother as expected. Can you suggest a way to improve my UI responsiveness? &lt;br /&gt;
&lt;br /&gt;
THANKS!&lt;br /&gt;
&lt;/div&gt;</description><author>icube</author><pubDate>Wed, 03 Apr 2013 04:54:16 GMT</pubDate><guid isPermaLink="false">New Post: Running background video 20130403045416A</guid></item><item><title>New Post: Dynamic Custom BitmapSource</title><link>http://microsoftdwayneneed.codeplex.com/discussions/241525</link><description>&lt;div style="line-height: normal;"&gt;
&lt;div&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;The last time I looked into this deeply, the bitmap source pixels would be cached. Unfortunately, the mechanisms for updating the cache were not exposed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;Your best bet is probably to look at shader effects, which will be more performant as well.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;a href="http://www.codeproject.com/Articles/71617/Getting-Started-with-Shader-Effects-in-WPF"&gt;http://www.codeproject.com/Articles/71617/Getting-Started-with-Shader-Effects-in-WPF&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;Dwayne Need |&lt;b&gt; System Center&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="font-size:11.0pt; font-family:"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in"&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="font-size:10.0pt; font-family:"&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size:10.0pt; font-family:"&gt; MythJuha [email removed]
&lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Thursday, September 27, 2012 7:26 AM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; Dwayne Need&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; Re: Dynamic Custom BitmapSource [MicrosoftDwayneNeed:241525]&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;From: MythJuha&lt;/span&gt;&lt;/p&gt;
&lt;div id="ThreadNotificationPostBody" style="margin-bottom:24.0pt"&gt;
&lt;p&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;Any ideas on this yet? I'm in need of something similar. Think of your ColorKeyBitmap, where i want to dynamically change which color should be used.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;Kind regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:9.0pt; font-family:"&gt;Stijn&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description><author>DwayneNeed</author><pubDate>Mon, 01 Oct 2012 17:05:02 GMT</pubDate><guid isPermaLink="false">New Post: Dynamic Custom BitmapSource 20121001050502P</guid></item><item><title>New Post: Dynamic Custom BitmapSource</title><link>http://microsoftdwayneneed.codeplex.com/discussions/241525</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Any ideas on this yet? I'm in need of something similar. Think of your ColorKeyBitmap, where i want to dynamically change which color should be used.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Stijn&lt;/p&gt;&lt;/div&gt;</description><author>MythJuha</author><pubDate>Thu, 27 Sep 2012 14:26:03 GMT</pubDate><guid isPermaLink="false">New Post: Dynamic Custom BitmapSource 20120927022603P</guid></item><item><title>New Post: ColorkeyBitmap Test Program - Updating UI</title><link>http://microsoftdwayneneed.codeplex.com/discussions/278149</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi !&lt;/p&gt;
&lt;p&gt;Any Update ?&lt;/p&gt;
&lt;p&gt;Best Regards.&lt;/p&gt;&lt;/div&gt;</description><author>AdamWorld</author><pubDate>Wed, 23 Nov 2011 10:01:20 GMT</pubDate><guid isPermaLink="false">New Post: ColorkeyBitmap Test Program - Updating UI 20111123100120A</guid></item><item><title>New Post: ColorkeyBitmap Test Program - Updating UI</title><link>http://microsoftdwayneneed.codeplex.com/discussions/278149</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi !&lt;/p&gt;
&lt;p&gt;&lt;a href="https://skydrive.live.com/#cid=E514BFD96B4CE2AD&amp;amp;id=E514BFD96B4CE2AD%21103"&gt;https://skydrive.live.com/#cid=E514BFD96B4CE2AD&amp;amp;id=E514BFD96B4CE2AD%21103&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can get my Test Program.&lt;/p&gt;
&lt;p&gt;Have a Nice Day.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;/div&gt;</description><author>adamworld</author><pubDate>Wed, 09 Nov 2011 07:37:26 GMT</pubDate><guid isPermaLink="false">New Post: ColorkeyBitmap Test Program - Updating UI 20111109073726A</guid></item><item><title>New Post: ColorkeyBitmap Test Program - Updating UI</title><link>http://microsoftdwayneneed.codeplex.com/discussions/278149</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi !&lt;/p&gt;
&lt;p&gt;I Sent Test Program on Email.&lt;/p&gt;
&lt;p&gt;And I am looking forward to the result on my Test Program.&lt;/p&gt;
&lt;p&gt;Have a Nice Day.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;/div&gt;</description><author>adamworld</author><pubDate>Mon, 07 Nov 2011 10:15:41 GMT</pubDate><guid isPermaLink="false">New Post: ColorkeyBitmap Test Program - Updating UI 20111107101541A</guid></item><item><title>New Post: ColorkeyBitmap Test Program - Updating UI</title><link>http://microsoftdwayneneed.codeplex.com/discussions/278149</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;I don't use gmail much, but I checked my gmail account and there wasn't any message from you.&lt;/p&gt;
&lt;p&gt;Please resend your repro to my hotmail account DwayneNeed (_at_) hotmail.com&lt;/p&gt;&lt;/div&gt;</description><author>DwayneNeed</author><pubDate>Fri, 04 Nov 2011 21:32:26 GMT</pubDate><guid isPermaLink="false">New Post: ColorkeyBitmap Test Program - Updating UI 20111104093226P</guid></item><item><title>New Post: ColorkeyBitmap Test Program - Updating UI</title><link>http://microsoftdwayneneed.codeplex.com/discussions/278149</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;In Google&amp;nbsp;Gmail box, &amp;nbsp;you can download a test program.&lt;/p&gt;&lt;/div&gt;</description><author>adamworld</author><pubDate>Fri, 04 Nov 2011 13:13:07 GMT</pubDate><guid isPermaLink="false">New Post: ColorkeyBitmap Test Program - Updating UI 20111104011307P</guid></item><item><title>New Post: ColorkeyBitmap Test Program - Updating UI</title><link>http://microsoftdwayneneed.codeplex.com/discussions/278149</link><description>&lt;div style="line-height: normal;"&gt;I send test program again.
&lt;div&gt;Sorry.&lt;br&gt;
&lt;br&gt;
&lt;div&gt;2011/11/4 DwayneNeed &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:notifications@codeplex.com"&gt;notifications@codeplex.com&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
&lt;blockquote style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex"&gt;
&lt;div&gt;
&lt;p&gt;From: DwayneNeed&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;Where did you send the test program? Perhaps just paste a link here to skydrive or dropbox?&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;Read the &lt;a href="http://microsoftdwayneneed.codeplex.com/discussions/278149#post693483" target="_blank"&gt;
full discussion online&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To add a post to this discussion, reply to this email (&lt;a href="mailto:MicrosoftDwayneNeed@discussions.codeplex.com?subject=[MicrosoftDwayneNeed:278149]" target="_blank"&gt;MicrosoftDwayneNeed@discussions.codeplex.com&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;To start a new discussion for this project, email &lt;a href="mailto:MicrosoftDwayneNeed@discussions.codeplex.com" target="_blank"&gt;
MicrosoftDwayneNeed@discussions.codeplex.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You are receiving this email because you subscribed to this discussion on CodePlex. You can
&lt;a href="https://microsoftdwayneneed.codeplex.com/subscriptions/thread/project/edit" target="_blank"&gt;
unsubscribe or change your settings&lt;/a&gt; on codePlex.com.&lt;/p&gt;
&lt;p&gt;Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at
&lt;a href="http://codeplex.com" target="_blank"&gt;codeplex.com&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;/div&gt;</description><author>adamworld</author><pubDate>Fri, 04 Nov 2011 01:27:07 GMT</pubDate><guid isPermaLink="false">New Post: ColorkeyBitmap Test Program - Updating UI 20111104012707A</guid></item><item><title>New Post: ColorkeyBitmap Test Program - Updating UI</title><link>http://microsoftdwayneneed.codeplex.com/discussions/278149</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Where did you send the test program?&amp;nbsp; Perhaps just paste a link here to skydrive or dropbox?&lt;/p&gt;&lt;/div&gt;</description><author>DwayneNeed</author><pubDate>Thu, 03 Nov 2011 18:23:32 GMT</pubDate><guid isPermaLink="false">New Post: ColorkeyBitmap Test Program - Updating UI 20111103062332P</guid></item><item><title>New Post: ColorkeyBitmap Test Program - Updating UI</title><link>http://microsoftdwayneneed.codeplex.com/discussions/278149</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;&lt;span lang="EN-US"&gt;Hi !&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="EN-US"&gt;Thank you for your help.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="EN-US"&gt;I send my test program.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="EN-US"&gt;Copy at least 5 images to bin/Debug folder then it will work well.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="EN-US"&gt;And I commented to let you understand my poor code.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="EN-US"&gt;Thank you.&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;</description><author>adamworld</author><pubDate>Thu, 03 Nov 2011 07:57:37 GMT</pubDate><guid isPermaLink="false">New Post: ColorkeyBitmap Test Program - Updating UI 20111103075737A</guid></item><item><title>New Post: WritePreamble() before FormatConvertedBitmap?</title><link>http://microsoftdwayneneed.codeplex.com/discussions/277988</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;I'm sorry we are miscommunicating.&amp;nbsp; I am NOT asking you to fix any code in my project.&amp;nbsp; I am only asking you to show me your test program (how you are USING my project).&lt;/p&gt;
&lt;p&gt;For example, you showed some code like:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt;(_nTime % 10 == 0)&lt;span style="color: green;"&gt;//. per 10 seconds update Image&lt;/span&gt;&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BitmapSource bitSrc = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _hBitmapStaff,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IntPtr.Zero,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Int32Rect.Empty,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BitmapSizeOptions.FromEmptyOptions());&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ColorKeyBitmap colorKeyBmp = &lt;span style="color: blue;"&gt;new&lt;/span&gt; ColorKeyBitmap();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; colorKeyBmp.TransparentColor = Color.FromArgb(255, 255, 255, 255);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; colorKeyBmp.Source = bitSrc;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; img.Source = colorKeyBmp;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt;(_nTime % 2 == 0)&lt;span style="color: green;"&gt;//. per 2 seconds update TextBlock&lt;/span&gt;&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text.Text = String.Format(&lt;span style="color: #a31515;"&gt;"{0}"&lt;/span&gt;, _nTime);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: green;"&gt;//text.invalidateVisible();&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: green;"&gt;//this.invalidateVisible();&lt;/span&gt;&lt;br /&gt;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;But this code snippet leaves me with questions:&lt;/p&gt;
&lt;p&gt;1) What kind of timer are you creating?&lt;br /&gt;2) What is hBitmapStaff?&lt;br /&gt;3) Is anything else interesting happening?&lt;br /&gt;&lt;br /&gt;If you can just zip up your test program and send it to me, I should be able to determine why it is not working.&lt;/p&gt;&lt;/div&gt;</description><author>DwayneNeed</author><pubDate>Thu, 03 Nov 2011 03:08:09 GMT</pubDate><guid isPermaLink="false">New Post: WritePreamble() before FormatConvertedBitmap? 20111103030809A</guid></item><item><title>New Post: WritePreamble() before FormatConvertedBitmap?</title><link>http://microsoftdwayneneed.codeplex.com/discussions/277988</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;First, Thank you very much for you production.&lt;/p&gt;
&lt;p&gt;I will do my best to contribute to this.&lt;/p&gt;
&lt;p&gt;... ... ... ... ...&lt;/p&gt;
&lt;p&gt;What I did for my problem is only removing&amp;nbsp;&lt;span style="font-family: Consolas, 'Courier New', Courier, monospace; white-space: pre;"&gt;WritePostscript() and Nothing else.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Consolas, 'Courier New', Courier, monospace; white-space: pre;"&gt;Following Code shows what I did.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Consolas, 'Courier New', Courier, monospace;"&gt;&lt;span style="white-space: pre;"&gt;in ChainedBitmap.cs&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Consolas, 'Courier New', Courier, monospace; white-space: pre;"&gt;
&lt;div style="color: black; background-color: white;"&gt;
&lt;pre style="color: black;"&gt;        &lt;span style="color: blue;"&gt;protected&lt;/span&gt; &lt;span style="color: blue;"&gt;override&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; CopyPixelsCore(Int32Rect sourceRect, &lt;span style="color: blue;"&gt;int&lt;/span&gt; stride, &lt;span style="color: blue;"&gt;int&lt;/span&gt; bufferSize, IntPtr buffer)
        {
            BitmapSource source = Source;
            BitmapSource convertedSource = source;

            &lt;span style="color: blue;"&gt;if&lt;/span&gt; (source != &lt;span style="color: blue;"&gt;null&lt;/span&gt;)
            {
                PixelFormat sourceFormat = source.Format;
                PixelFormat destinationFormat = Format;

                &lt;span style="color: blue;"&gt;if&lt;/span&gt; (sourceFormat != destinationFormat)
                {
                    &lt;span style="color: green;"&gt;// We need a format converter.  Reuse the cached one if&lt;/span&gt;
                    &lt;span style="color: green;"&gt;// it still matches.&lt;/span&gt;
                    &lt;span style="color: blue;"&gt;if&lt;/span&gt; (_formatConverter == &lt;span style="color: blue;"&gt;null&lt;/span&gt; ||
                        _formatConverter.Source != source ||
                        _formatConverter.Format != destinationFormat ||
                        _formatConverterSourceFormat != sourceFormat)
                    {
                        WritePreamble();
                        _formatConverterSourceFormat = sourceFormat;
                        _formatConverter = &lt;span style="color: blue;"&gt;new&lt;/span&gt; FormatConvertedBitmap(source, destinationFormat, Palette, 0);&lt;/pre&gt;
&lt;pre style="color: black;"&gt;                        &lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;&lt;span style="color: green;"&gt;//WritePostscript();//. This Is What I Did. But Think This Is Neccessary.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;                    }

                    convertedSource = _formatConverter;
                }

                convertedSource.CopyPixels(sourceRect, buffer, bufferSize, stride);
            }
        }
&lt;/pre&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;But even if I want to repro as you mentioned, removing WritePostscript is unsafe i think.&lt;/p&gt;
&lt;p&gt;And that Unsatefty make me worry to make error.&lt;/p&gt;
&lt;p&gt;So right now I try to do everything to get the reason WHY?&lt;/p&gt;&lt;/div&gt;</description><author>adamworld</author><pubDate>Thu, 03 Nov 2011 03:04:02 GMT</pubDate><guid isPermaLink="false">New Post: WritePreamble() before FormatConvertedBitmap? 20111103030402A</guid></item><item><title>New Post: WritePreamble() before FormatConvertedBitmap?</title><link>http://microsoftdwayneneed.codeplex.com/discussions/277988</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;You obviously have some code already, which is where you see this problem.&amp;nbsp; Can't you share it with me?&lt;/p&gt;&lt;/div&gt;</description><author>DwayneNeed</author><pubDate>Thu, 03 Nov 2011 02:44:34 GMT</pubDate><guid isPermaLink="false">New Post: WritePreamble() before FormatConvertedBitmap? 20111103024434A</guid></item><item><title>New Post: WritePreamble() before FormatConvertedBitmap?</title><link>http://microsoftdwayneneed.codeplex.com/discussions/277988</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;That's a good idea. Thank you.&lt;/p&gt;
&lt;p&gt;But I am not as good as you to do the good job.&lt;/p&gt;
&lt;p&gt;Now I really want you to give me a hint where I should update.&lt;/p&gt;
&lt;p&gt;Help me.&lt;/p&gt;&lt;/div&gt;</description><author>adamworld</author><pubDate>Thu, 03 Nov 2011 02:39:10 GMT</pubDate><guid isPermaLink="false">New Post: WritePreamble() before FormatConvertedBitmap? 20111103023910A</guid></item></channel></rss>