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

WPF

 
GeneralRe: UserControl question Pin
AghaKhan1-May-09 18:56
AghaKhan1-May-09 18:56 
GeneralRe: UserControl question Pin
RugbyLeague1-May-09 9:19
RugbyLeague1-May-09 9:19 
GeneralRe: UserControl question Pin
Gideon Engelberth1-May-09 17:09
Gideon Engelberth1-May-09 17:09 
AnswerRe: UserControl question Pin
fjparisIII3-May-09 2:22
fjparisIII3-May-09 2:22 
QuestionMy WCF client deadlock Pin
Richard Dutton1-May-09 4:32
Richard Dutton1-May-09 4:32 
QuestionDependency properties!Performance issue Pin
pioner30-Apr-09 19:48
pioner30-Apr-09 19:48 
AnswerRe: Dependency properties!Performance issue Pin
Gideon Engelberth1-May-09 3:27
Gideon Engelberth1-May-09 3:27 
QuestionSaving image transform without losing metadata Pin
fjparisIII30-Apr-09 6:35
fjparisIII30-Apr-09 6:35 
This is probably embarrassingly simple to accomplish but in researching and researching I can't find the answer.

I've captured the BitmapMetadata from the image file I'm transforming. Then I have successfully used TransformBitmap and ScaleTransform to scale from and to any of the six image formats supported by WPF, all without a hitch -- except one hitch which I knew I would have to deal with after getting the basic scaling mechanism working. The problem is getting the metadata transferred from the source image files to the destination image files.

There are Metadata properties in all six encoders but when I try to assign the metadata from the original image I get an exception complaining, "The designated BitmapEncoder does not support global metadata." Is "non-global metadata" a BitmapFrame? That only has a "get" property, no "set". That's the problem with all the speculations I've come up with to solve this problem: you can't assign a BitmapMetadata object to the Metadata property of any BitmapSource-derived class that I've been able to find. Looking for a solution in that direction just leads me up blind alleys.

A related issue is that I've read that when creating a new image from existing bitmap data, if you want metadata in the image, it has to be added before the bitmap data. But I haven't been able to figure out how to do that, either.

I have several books on WPF. None of them get remotely near to dealing with these issues, as fundamental as they are.

So what is the solution? It's got to be embarrassingly simple and I'm going to kick myself when I see it, but I'll be eternally grateful to anyone who supplies me with the answer.
AnswerRe: Saving image transform without losing metadata Pin
fjparisIII30-Apr-09 8:47
fjparisIII30-Apr-09 8:47 
GeneralRe: Saving image transform without losing metadata (NOT SOLVED: where is everybody?) Pin
fjparisIII30-Apr-09 15:01
fjparisIII30-Apr-09 15:01 
GeneralRe: Saving image transform without losing metadata Pin
fjparisIII2-May-09 17:16
fjparisIII2-May-09 17:16 
GeneralRe: Saving image transform without losing metadata Pin
fjparisIII3-May-09 16:53
fjparisIII3-May-09 16:53 
AnswerRe: Saving image transform without losing metadata Pin
Pete O'Hanlon4-May-09 9:12
mvePete O'Hanlon4-May-09 9:12 
GeneralRe: Saving image transform without losing metadata Pin
fjparisIII4-May-09 9:36
fjparisIII4-May-09 9:36 
GeneralRe: Saving image transform without losing metadata Pin
Pete O'Hanlon4-May-09 9:42
mvePete O'Hanlon4-May-09 9:42 
GeneralRe: Saving image transform without losing metadata Pin
fjparisIII4-May-09 9:58
fjparisIII4-May-09 9:58 
GeneralRe: Saving image transform without losing metadata Pin
Pete O'Hanlon4-May-09 10:06
mvePete O'Hanlon4-May-09 10:06 
GeneralRe: Saving image transform without losing metadata Pin
fjparisIII20-May-09 14:59
fjparisIII20-May-09 14:59 
GeneralRe: Saving image transform without losing metadata Pin
fjparisIII22-May-09 13:25
fjparisIII22-May-09 13:25 
QuestionCookies vs. isolated Storage Pin
Ray Cassick30-Apr-09 3:44
Ray Cassick30-Apr-09 3:44 
AnswerRe: Cookies vs. isolated Storage Pin
Mark Salsbery30-Apr-09 6:00
Mark Salsbery30-Apr-09 6:00 
AnswerRe: Cookies vs. isolated Storage Pin
GuinnessKMF4-May-09 3:28
GuinnessKMF4-May-09 3:28 
QuestionResource Dictionary and Data Templates Pin
BlitzPackage30-Apr-09 1:50
BlitzPackage30-Apr-09 1:50 
AnswerRe: Resource Dictionary and Data Templates Pin
User 2710091-May-09 4:56
User 2710091-May-09 4:56 
GeneralRe: Resource Dictionary and Data Templates Pin
BlitzPackage1-May-09 7:04
BlitzPackage1-May-09 7:04 

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.