Click here to Skip to main content
15,899,639 members
Home / Discussions / WPF
   

WPF

 
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 
QuestionMultiple client access in a wcf service Pin
JS 200810-Jun-09 3:26
JS 200810-Jun-09 3:26 
AnswerRe: Multiple client access in a wcf service Pin
Mark Salsbery10-Jun-09 6:57
Mark Salsbery10-Jun-09 6:57 
QuestionSilverlight + WCF Communication Pin
JS 200810-Jun-09 3:25
JS 200810-Jun-09 3:25 
AnswerRe: Silverlight + WCF Communication Pin
Mark Salsbery10-Jun-09 6:53
Mark Salsbery10-Jun-09 6:53 
GeneralRe: Silverlight + WCF Communication Pin
JS 200810-Jun-09 17:54
JS 200810-Jun-09 17:54 
GeneralRe: Silverlight + WCF Communication Pin
Mark Salsbery11-Jun-09 10:22
Mark Salsbery11-Jun-09 10:22 
QuestionHow to get images in Application's folder Pin
Nekkantidivya10-Jun-09 2:40
Nekkantidivya10-Jun-09 2:40 
AnswerRe: How to get images in Application's folder Pin
User 27100910-Jun-09 5:00
User 27100910-Jun-09 5:00 
AnswerRe: How to get images in Application's folder Pin
ABitSmart10-Jun-09 5:03
ABitSmart10-Jun-09 5:03 
AnswerRe: How to get images in Application's folder Pin
varun 200924-Feb-10 20:35
varun 200924-Feb-10 20:35 
QuestionWPF Datagrid? Pin
S Rajput9-Jun-09 15:37
S Rajput9-Jun-09 15:37 
AnswerRe: WPF Datagrid? Pin
Christian Graus9-Jun-09 15:48
protectorChristian Graus9-Jun-09 15:48 
GeneralRe: WPF Datagrid? Pin
S Rajput9-Jun-09 16:37
S Rajput9-Jun-09 16:37 
GeneralRe: WPF Datagrid? Pin
Christian Graus9-Jun-09 17:17
protectorChristian Graus9-Jun-09 17:17 
GeneralRe: WPF Datagrid? Pin
S Rajput9-Jun-09 19:08
S Rajput9-Jun-09 19:08 

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.