for the last few weeks i have been trying to sort out what the problem is and how to fix it. perhaps someone here who knows more about the jpeg decoding can help.
i am trying to help a co worker finish an application. we have a catalog of jpg files that need to be downloaded and shown in a silverlight application.
the images show up perfect in windows, in paint shop pro, in ExifPro and with WIC explorer
when we try and load the images into the BitMapImage class via SetSource(stream) we get a COM_Fail hresult exception
in exploring the code for FJCore it seems that the decoder just gets to the end of the stream and keeps trying to find another block of data when the last complete block has been decoded.
so at some level if we can tell it to stop and just return the image then it would work like other software does and we could use the imagetools library to handle the jpeg files.
for more details please look at this on connect:
FJCore is calling DecodeMCU() where the stream has only 1 byte left.