Here is my code... public async Task SetLargeImageAsync(byte[] imageBytes, bool storeBytesInObject = false) { var tcs = new TaskCompletionSource<string>(); SmartDispatcher.BeginInvoke(() => { using (MemoryStream ms = new MemoryStream(imageBytes)) { if (storeBytesInObject) this.LargeImageBytes = imageBytes; BitmapImage image = new BitmapImage(); image.SetSource(ms); this.LargeImage = image; tcs.SetResult(string.Empty); } }); await tcs.Task; } I [...] read more
Using C#/.NET for my application, I've got a series of classes in my main data model that represent "binary" (as opposed to text) content. I've got a inheritance setup like this: alt text [https://i.stack.imgur.com/UGWBt.jpg] Basically, the abstract class BinaryContent contains a MemoryStream that stores arbitrary binary data. That data is [...] read more
I created a Texture Cube with NVidia's Texture Exporter Tool but I cannot load it with IWICDdsDecoder. It fails with 0x88982f61 : The image header is unrecognized.. On the other hand, normal 2D textures (Dimension = WICDdsTexture2D) created with NVTET load correctly and work well. Does IWICDdsLoader support Cube Maps [...] read more
I am working on an application for working with photos for Windows 8 Metro on C#. And now I'm faced with a strange problem. First, I select the file over PickSingleFileAsync, then trying to get a thumbnail via GetThumbnailAsync: FileOpenPicker openPicker = new FileOpenPicker (); openPicker.ViewMode = PickerViewMode.Thumbnail; openPicker.SuggestedStartLocation = [...] read more
I have a simple encoding/ decoding application using Windows Imaging Component API. The issue I'm having is that when I use either the JPEGXR or BMP formats, everything works fine. However, when I use the JPEG codec - the encoder works fine and I can visually verify the generated JPEG [...] read more