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

WPF

 
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 
Insincere Dave wrote:
The software rendering code goes in the loaded event and you apply it to the window, but im not sure it will have any effect if you are just saving the image and not displaying it.


In my original application, I'm just saving it and not displaying it, but I've written a test application based on code you provided where I just display it and don't save it. I was actually surprised when I saw the bug appear even in this simplified code. I've written the following function, based on code you provided, and this function demonstrates the problem with 100% reliability in 10 different images from my Nikon D2X camera:

void ScaleBitmapImage(string imagePath, double targetSize, Image image)
{
    Uri uri = new Uri(imagePath);
    BitmapImage bitmapImage = new BitmapImage(uri);
    var scale = targetSize / bitmapImage.PixelWidth;
    TransformedBitmap scaledBitmap = new TransformedBitmap();
    scaledBitmap.BeginInit();
    scaledBitmap.Source = bitmapImage;
    scaledBitmap.Transform = new ScaleTransform(scale, scale);
    scaledBitmap.EndInit();
    image.Source = scaledBitmap;
}

Insincere Dave wrote:
Im using VS 2010 on vista


I'm using VS 2008 on Vista, but I have installed VS 2010. I just haven't gotten around to trying it out yet on 2010. Maybe I should try that next.

Insincere Dave wrote:
I have also installed the platform update for vista which may have updated the windows imaging component.


I've been Googling around trying to figure out how to download this update and I haven't found anything definitive. I've seen plenty of references to it but no specific link to a download page. I followed Microsoft's instructions at this link:

http://support.microsoft.com/kb/971644[^]

But when I follow the instructions, the closest thing it lists in the Windows Update List is an item called, "Update for Windows Vista for x64-based systems - English (KB937286)". Hopefully that is the same thing as the Platform Update for Vista. I'm about to do that now, which of course means rebooting my machine. I'll let you know how things turn out. I'd love to be able to tell my customers what needs to be done to solve this horrendous bug.
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 
GeneralRe: ScaleTransform sometimes produces glaring artifacts SOLVED!!! Pin
fjparisIII10-Dec-09 7:35
fjparisIII10-Dec-09 7:35 
GeneralRe: ScaleTransform sometimes produces glaring artifacts SOLVED!!! Pin
Insincere Dave10-Dec-09 8:27
Insincere Dave10-Dec-09 8:27 
GeneralRe: ScaleTransform sometimes produces glaring artifacts SOLVED!!! Pin
fjparisIII10-Dec-09 12:07
fjparisIII10-Dec-09 12:07 
QuestionTreeview padding in WPF ? Pin
Mohammad Dayyan4-Dec-09 21:29
Mohammad Dayyan4-Dec-09 21:29 
AnswerRe: Treeview padding in WPF ? Pin
Mark Salsbery5-Dec-09 7:15
Mark Salsbery5-Dec-09 7:15 
GeneralRe: Treeview padding in WPF ? Pin
Mohammad Dayyan5-Dec-09 7:18
Mohammad Dayyan5-Dec-09 7:18 
QuestionMedia Player - export Pin
john john mackey4-Dec-09 9:17
john john mackey4-Dec-09 9:17 
AnswerRe: Media Player - export Pin
Mark Salsbery4-Dec-09 10:15
Mark Salsbery4-Dec-09 10:15 
AnswerRe: Media Player - export Pin
Abhinav S4-Dec-09 22:10
Abhinav S4-Dec-09 22:10 
QuestionHow to call javascript functions in silverlight. Pin
Nekkantidivya3-Dec-09 23:44
Nekkantidivya3-Dec-09 23:44 

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.