0

Possible Duplicate:
How to crop image on ScheduledTaskAgent in Windows Phone

I'm trying to read and process (really, just resize) a PNG or a JPEG image in the background agent.

Turns out, I can't use BitmapImage or WriteableBitmap to make use of its PNG/JPEG decoding and resizing capabilities since they require running in the UI thread (which is obviously non-existent in the background agent).

I looked at third-party libraries, like ImageTools. ImageTools does not appear to support JPG for Windows Phone.

What can I do to be able to process (read, process, save) image while in the background thread? I obviously don't want to re-invent the wheel and write my own decoder.

Thank you,

Dan

P.S. Why are things always harder than you imagine they should be?

Community
  • 1
  • 1
New Dev
  • 48,427
  • 12
  • 87
  • 129

1 Answers1

1

I've been solving the exact same problem before, my solution is here:
How to resize Image in C# WinRT/winmd?

Community
  • 1
  • 1
Martin Suchan
  • 10,600
  • 3
  • 36
  • 66