Click here to Skip to main content
15,912,329 members
Home / Discussions / WPF
   

WPF

 
QuestionHow to check Stack panel items Pin
Nekkantidivya11-Jun-09 0:38
Nekkantidivya11-Jun-09 0:38 
AnswerRe: How to check Stack panel items Pin
ABitSmart11-Jun-09 3:37
ABitSmart11-Jun-09 3:37 
QuestionFormatting XAML for CP Article Pin
Jammer11-Jun-09 0:03
Jammer11-Jun-09 0:03 
AnswerRe: Formatting XAML for CP Article Pin
Pete O'Hanlon11-Jun-09 2:10
mvePete O'Hanlon11-Jun-09 2:10 
GeneralRe: Formatting XAML for CP Article Pin
Jammer11-Jun-09 9:51
Jammer11-Jun-09 9:51 
GeneralRe: Formatting XAML for CP Article Pin
Pete O'Hanlon11-Jun-09 11:21
mvePete O'Hanlon11-Jun-09 11:21 
GeneralRe: Formatting XAML for CP Article Pin
Jammer11-Jun-09 12:39
Jammer11-Jun-09 12:39 
QuestionMultiple UserControls Pin
zauberfisch10-Jun-09 22:56
zauberfisch10-Jun-09 22:56 
AnswerRe: Multiple UserControls Pin
Christian Graus10-Jun-09 23:08
protectorChristian Graus10-Jun-09 23:08 
GeneralRe: Multiple UserControls Pin
zauberfisch10-Jun-09 23:18
zauberfisch10-Jun-09 23:18 
AnswerRe: Multiple UserControls Pin
Pete O'Hanlon10-Jun-09 23:27
mvePete O'Hanlon10-Jun-09 23:27 
GeneralRe: Multiple UserControls Pin
zauberfisch11-Jun-09 0:39
zauberfisch11-Jun-09 0:39 
AnswerRe: Multiple UserControls Pin
#realJSOP10-Jun-09 23:31
professional#realJSOP10-Jun-09 23:31 
AnswerRe: Multiple UserControls Pin
Gideon Engelberth11-Jun-09 3:27
Gideon Engelberth11-Jun-09 3:27 
QuestionSound animation Pin
Member 343091110-Jun-09 12:43
Member 343091110-Jun-09 12:43 
AnswerRe: Sound animation Pin
Christian Graus10-Jun-09 14:49
protectorChristian Graus10-Jun-09 14:49 
QuestionHow do you save a lossless rotation of a JPEG file under WPF? Pin
fjparisIII10-Jun-09 4:26
fjparisIII10-Jun-09 4:26 
AnswerRe: How do you save a lossless rotation of a JPEG file under WPF? Pin
Christian Graus10-Jun-09 8:50
protectorChristian Graus10-Jun-09 8:50 
GeneralRe: How do you save a lossless rotation of a JPEG file under WPF? Pin
fjparisIII10-Jun-09 9:19
fjparisIII10-Jun-09 9:19 
GeneralRe: How do you save a lossless rotation of a JPEG file under WPF? Pin
Christian Graus10-Jun-09 9:24
protectorChristian Graus10-Jun-09 9:24 
GeneralRe: How do you save a lossless rotation of a JPEG file under WPF? [modified] Pin
fjparisIII10-Jun-09 9:48
fjparisIII10-Jun-09 9:48 
GeneralRe: How do you save a lossless rotation of a JPEG file under WPF? Pin
Christian Graus10-Jun-09 9:56
protectorChristian Graus10-Jun-09 9:56 
GeneralRe: How do you save a lossless rotation of a JPEG file under WPF? (STILL NOT SOLVED) Pin
fjparisIII10-Jun-09 10:39
fjparisIII10-Jun-09 10:39 
Christian Graus wrote:
You rotate it, as a JPEG, in memory, not as a bitmap. Thus keeping the artefacts you have, but not creating new ones ?


Exactly. Now you get it.

Regarding your WPF application that resizes images to fit the display, my application does the same thing. I don't know if you'd call my images huge (they're from 12 MPixel Nikon cameras, so 4288x2848), but WPF scales them in about two seconds.

Are you using the CroppedBitmap class to do this? I don't bother with this. Instead I just set the Margin property of the Grid object that holds the System.Windows.Controls.Image object that lives inside the grid. It works pretty well. I even use the same technique for zooming around an image at 1:1. The margin just propagates down to the image. I never touch the original bitmap once it decoded. I just let WPF worry about it and since WPF goes directly to DirectX it's pretty fast.

In fact one of my beta testers (actually pre-alpha) is amazed by how fast my new app based on WPF rotates images compared to the original C++/MFC app that used GDI+, which I guess goes through gobs of layers. My new app basically rotates an image instantly even on his slow machine, whereas my original GDI+ app takes a couple seconds on his machine.

I also support saving resized images to disk. I haven't noticed the "horrible artifacts" that you report. I'm using .NET 3.5.

I'm also somewhat disconcerted by the lack of low level control over garbage collection under .NET, especially since my app offers batch operations that can process thousands of images in a background thread. But it seems to do okay, not really any worse than my original C++ app based on GDI+.

What I've found is that the time to load a program can be a problem if it needs dozens of pages it has to render during startup. It's that JIT compiling that's the bottleneck. I'm still in pre-alpha testing so I'm not too worried about performance yet, but eventually I'll have to load pages on a demand basis so that the app displays instantly, instead of rendering all 70 pages that are in the app currently before it gives control to the user. On my 64-bit machine with 8 GBytes of RAM, the program displays in 2 seconds, but on my beta tester's machine with 1 GByte of RAM, it takes 30 seconds to render the app. Ugh!

Where WPF really shines and blows old rendering technologies away is individual image processing operations: displaying (say) an image that is 1920x1440 on a monitor that size is instantaneous, whereas with my old C++ app using GDI+ it would take a couple seconds to render such an image.

There's huge promise in WPF. I just hope Microsoft doesn't give up on it.

modified on Wednesday, June 10, 2009 5:01 PM

GeneralRe: How do you save a lossless rotation of a JPEG file under WPF? Pin
Christian Graus10-Jun-09 11:00
protectorChristian Graus10-Jun-09 11:00 
QuestionHow do I make my 3D models look more realistic Pin
Etienne_12310-Jun-09 3:40
Etienne_12310-Jun-09 3:40 

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.