BlurEffect on Windows 8 only blurs horizontally when radius < 20

Feb 17, 2013 at 9:08 AM

I had a look at your project, as I was curious how fast GDI+ applies a Guassian-Blur, and noticed that it wasn't applied correctly. First I though it was in your code, but I also found some other projects which have the same issue.

It seems that when the radius is less than 20, the Gaussian is only applied horizontally.

Than I tested this on Windows 7, and had no issues.

Do you or someone else have an idea what is wrong here, do we need to report a bug with Microsoft or is it something which is wrong in the way it is used?

Best wishes,
Feb 17, 2013 at 10:06 AM
The other project I found is located here:
Although I can't read most of it, the keyword were there and the download gives a project which allowed me to test the < 20 "bug".
Feb 17, 2013 at 9:10 PM
Edited Feb 17, 2013 at 9:11 PM

Thankyou for taking the time to contact me.

Assuming you were running it originally on Windows Vista (im assuming this because Windows 7 dosn't have the issue as you stated, and Windows XP dosn't have GDI 1.1 so my framework always runs in legacy mode), then it is quite possible that there is a bug in the Windows Vistas implementation of the Blur effect on this version of windows, however, I don't have any Windows Vista machines at home to test with, I only have 1 XP and the rest are Windows 7, you can run the effect in legacy mode for values < 20 if you like, this should fix the problem, simply use this code to turn on "Force legacy" mode for the effect:

((ILegacyEffect)effect).ForceLegacy = true;

Legacy mode is applied using the CPU and code within CSharpGDI+ so it bypasses the Windows GDI+ altogether, however it does run a little slower depending on your CPUs capabilities. The good thing is, that the legacy mode should be pretty fast for < 20 pixels of blur.

That link you posted actually uses some of my code from the CSharpGDI+ library (he actually credits me :) ), however, I can't see any reason for this problem except there being a bug in Windows Vista. Doing searches on Google dosn't seem to bring up anything specific, however, I will keep looking and let you know if I find anything more specific.
Feb 18, 2013 at 8:41 AM

I thought the title would be clear... :)

This only happend on Windows 8, on Vista and Windows 7 this works fine.

I found this project after googling for my issue, unfortunately there doesn't seem to be a report for this.

Best wishes,
Feb 18, 2013 at 9:40 AM
Edited Feb 18, 2013 at 9:48 AM
Dam sorry mate, missed the title altogether! I do have a Windows 8 machine, Ill check it out for you!

EDIT: I can replicate this issue in Windows 8 Consumer Preview - what version of Windows 8 are you running?

I would definitely say its a bug in the GDI+ 1.1 API.
Feb 18, 2013 at 6:20 PM
I'm using Windows 8 Pro in 32 and 64 bit.
Didn't do any other testing, so I don't know if anything else doesn't work,

Good to know that it's not my two PC's!

Had a quick look to be sure, this is not an issue on Windows 7 64-bit.
Feb 18, 2013 at 8:08 PM
Edited Feb 18, 2013 at 8:15 PM
The only other thing I can think of that may be causing it is Graphics Drivers / Settings, GDI+ 1.1 uses the graphics card with special shaders to perform its effects (this is why its so fast), maybe something in the drivers or the graphics settings is causing it not to work properly?

I am going to have a play with it when I get some more time :)

EDIT: OR... maybe they have changed the blur effect parameters to be able to specify the horizontal and vertical blur separately and my program is only specifying the former...

Although, according to this it hasnt changed:
Feb 19, 2013 at 7:36 PM
Edited Feb 20, 2013 at 7:07 PM
I haven't been able to find anything either, I did notice that when the struct has additional fields the behavior changes but this might be nothing.
As I only needed the BlurEffect I don't know if there are any issues with other effects.

In the mean time I reported this to Microsoft here

Let's see if they can help us.