Share via


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:

Comments

  • Anonymous
    October 30, 2008
    PingBack from http://blogs.msdn.com/jstegman/archive/2008/10/30/updated-source-for-image-samples.aspx

  • Anonymous
    November 04, 2008
    Hi Joe, I cannot find the BMPDecoder source that the BMPDecoderSample references..

  • Anonymous
    November 10, 2008
    I updated the Image Source samples to include the BMP Decoder (missing from my previous post).

  • Anonymous
    November 12, 2008
    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

  • Anonymous
    December 08, 2008
    Joe Stegman som arbetar i Silverlight-teamet har satt ihop nĂ¥gra demokodsprojekt som visar hur du kan

  • Anonymous
    May 19, 2009
    The comment has been removed

  • Anonymous
    August 16, 2012
    Hi Joe, If I/my workmates want to use your EditableImage and PNGEncoder classes in our company's commercial products, do I/my workmates (or my company) have to pay any fees or royalties to you or anybody else? Appreciate your response!