Welcome to MSDN Blogs Sign in | Join | Help

Updated Source for Image Samples

Updated on 11/10 to fix the ZIP archives and add dependent projects.

In addition to updating the image samples to the final version of Silverlight V2, I've also updated the source:

For each of these samples, you'll need the following project:

Published Thursday, October 30, 2008 6:22 PM by jstegman

Comments

Friday, October 31, 2008 1:27 AM by Joe Stegman's WebBlog : Updated Source for Image Samples

# Joe Stegman's WebBlog : Updated Source for Image Samples

Tuesday, November 04, 2008 11:39 PM by adam11235

# re: Updated Source for Image Samples

Hi Joe,

I cannot find the BMPDecoder source that the BMPDecoderSample references..

Monday, November 10, 2008 2:58 PM by Joe Stegman's WebBlog

# Added BMP Decoder

I updated the Image Source samples to include the BMP Decoder (missing from my previous post).

Wednesday, November 12, 2008 10:32 AM by Michaeljz

# re: Updated Source for Image Samples

Thanks for the example of how to do this.  I also found an example on Ian Griffith's blog and have built some practice applications using the technique.

Based on code inspection (not profiling) you could improve the PngEncoder performance substantially by rewriting the ComputeAdler32 function.  It currently performs two modulus operations per byte endoded image (so typically six modulus operations per pixel) which is computationally expensive.  Wikipedia.org has an example of optimized adler32 code -- short explanation is to perform the modulus only every 5552 iterations, because s1 and s2 are guaranteed not to overlow a 32bit int until then.

It's unfortunate that there isn't an alternative encoding method to use for PNG.  You need to make three passes through the data -- once to copy the pixels which you do in a Write, once to computer adler32, and once to compute CRC.  Not only that, but a change to a small part of the image requires reprocessing all of it for the adler32 computation.

Michael

Monday, December 08, 2008 5:45 PM by Robert Folkesson

# Saknar du stöd för GIF och BMP-bilder i Silverlight?

Joe Stegman som arbetar i Silverlight-teamet har satt ihop några demokodsprojekt som visar hur du kan

Wednesday, May 20, 2009 6:12 AM by Gonçalo Chaves

# Links da Semana (18-22)

Apesar de andar muito ocupado nestes últimos dias, com projectos importantes e de carácter importante

Anonymous comments are disabled
 
Page view tracker