Click here to Skip to main content
15,887,027 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Session variables in Silverlight or wcf service Pin
Abhinav S10-Dec-09 6:37
Abhinav S10-Dec-09 6:37 
QuestionApplication menu button issue Pin
trey white7-Dec-09 8:40
trey white7-Dec-09 8:40 
QuestionWPF Ribbon bar issue Pin
trey white7-Dec-09 8:35
trey white7-Dec-09 8:35 
AnswerRe: WPF Ribbon bar issue Pin
trey white7-Dec-09 11:09
trey white7-Dec-09 11:09 
QuestionError in RoutedEventHandler() Pin
Anu_Bala7-Dec-09 0:04
Anu_Bala7-Dec-09 0:04 
QuestionUsing WPF Browser application in website. Pin
Hema Bairavan6-Dec-09 18:02
Hema Bairavan6-Dec-09 18:02 
QuestionSimple templated grid row. Pin
Dunge6-Dec-09 9:21
Dunge6-Dec-09 9:21 
QuestionScaleTransform sometimes produces glaring artifacts [modified] Pin
fjparisIII5-Dec-09 13:47
fjparisIII5-Dec-09 13:47 
I believe this is a bug in WPF 3.5. I've done extensive testing with the ScaleTransform class and only certain ranges produce the artifacts, but the transitions are sudden: it works at one scaling, then add 4 pixels to the size of the image and the artifacts appear. That's a high level description. Now for the nitty gritty details.

If you're scaling images over a certain size, glaring artifacts will appear in the scaled images if the scaled images are larger than will fit in a box 2900x2900, or any size larger than the originals if the originals will not fit into a box 2900x2900. The larger the scaled images the worse the artifacts will be. How close the scaled images can be to the size of the original is non-linear. To avoid artifacts, the larger the original, the smaller the scaled images must be relative to the original images. The following data points were tested:

1. If you want to scale originals that fit in a 6000x6000 box, the scaled images can be no larger than 2900x2900, or artifacts in the scaled images will appear.

2. If you want to scale originals that fit in a 4288x4288 box, the scaled images can be no larger than 2904x2904, or artifacts in the scaled images will appear.

3. If you want to scale originals that fit in a 3008x3008 box, the scaled images can be no larger than 2900x2900, or artifacts in the scaled images will appear.

4. If you want to scale originals that fit into 2900x2900, you can't scale images into 2904x2904 without producing minor artifacts, but 2896x2896 produces no artifacts.

5. If you want to scale originals that fit into 1920x1920, you can scale images into a box as large as 4384x4384 without producing artifacts. 4388x4388 and larger produces artifacts.

6. If you want to scale originals that fit into 960x960, you can scale images into a box as large as 8772x8772 without producing artifacts. 8776x8776 and larger produces artifacts.

I don't know whether this bug has been fixed in .NET 4.0 but hope to get around to testing this in the near future. If anyone knows a workaround, please let me know.

modified on Saturday, December 5, 2009 8:06 PM

AnswerRe: ScaleTransform sometimes produces glaring artifacts [modified] Pin
Insincere Dave6-Dec-09 13:55
Insincere Dave6-Dec-09 13:55 
GeneralRe: ScaleTransform sometimes produces glaring artifacts Pin
fjparisIII6-Dec-09 14:35
fjparisIII6-Dec-09 14:35 
GeneralRe: ScaleTransform sometimes produces glaring artifacts Pin
fjparisIII7-Dec-09 6:32
fjparisIII7-Dec-09 6:32 
GeneralRe: ScaleTransform sometimes produces glaring artifacts Pin
Insincere Dave7-Dec-09 13:43
Insincere Dave7-Dec-09 13:43 
GeneralRe: ScaleTransform sometimes produces glaring artifacts Pin
fjparisIII7-Dec-09 14:46
fjparisIII7-Dec-09 14:46 
GeneralRe: ScaleTransform sometimes produces glaring artifacts Pin
Insincere Dave7-Dec-09 16:30
Insincere Dave7-Dec-09 16:30 
GeneralRe: ScaleTransform sometimes produces glaring artifacts Pin
fjparisIII8-Dec-09 7:15
fjparisIII8-Dec-09 7:15 
GeneralRe: ScaleTransform sometimes produces glaring artifacts Pin
fjparisIII9-Dec-09 4:54
fjparisIII9-Dec-09 4:54 
GeneralRe: ScaleTransform sometimes produces glaring artifacts Pin
Insincere Dave9-Dec-09 6:19
Insincere Dave9-Dec-09 6:19 
GeneralRe: ScaleTransform sometimes produces glaring artifacts Pin
fjparisIII9-Dec-09 7:20
fjparisIII9-Dec-09 7:20 
GeneralRe: ScaleTransform sometimes produces glaring artifacts Pin
fjparisIII9-Dec-09 9:20
fjparisIII9-Dec-09 9:20 
GeneralRe: ScaleTransform sometimes produces glaring artifacts Pin
Insincere Dave9-Dec-09 9:48
Insincere Dave9-Dec-09 9:48 
GeneralRe: ScaleTransform sometimes produces glaring artifacts Pin
fjparisIII9-Dec-09 10:01
fjparisIII9-Dec-09 10:01 
GeneralRe: ScaleTransform sometimes produces glaring artifacts SOLVED!!! Pin
fjparisIII9-Dec-09 11:05
fjparisIII9-Dec-09 11:05 
GeneralRe: ScaleTransform sometimes produces glaring artifacts SOLVED!!! Pin
Insincere Dave9-Dec-09 14:58
Insincere Dave9-Dec-09 14:58 
GeneralRe: ScaleTransform sometimes produces glaring artifacts SOLVED!!! Pin
fjparisIII9-Dec-09 15:16
fjparisIII9-Dec-09 15:16 
GeneralRe: ScaleTransform sometimes produces glaring artifacts SOLVED!!! Pin
Insincere Dave9-Dec-09 15:29
Insincere Dave9-Dec-09 15:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.