PNG encoder changes?

Dec 16, 2013 at 7:25 PM
Can you explain the recent PNG encoder changes? My image is now rotated 90 degrees clockwise from previous.
Coordinator
Dec 16, 2013 at 8:55 PM
I think this is related to the breaking change applied 2013-11-14:
https://oxyplot.codeplex.com/SourceControl/changeset/62c4f57c6da9
(to make all the pixel arrays consistent - in OxyImage, pdf exporter, png encoder etc)

See the documentation for the PngEncoder.Export method, I guess you need to change the order of the indices in the source array:
        /// <summary>
        /// Encodes the specified image data to png.
        /// </summary>
        /// <param name="pixels">
        /// The pixel data indexed as [x,y] (bottom line first).
        /// </param>
        /// <returns>
        /// The png image data.
        /// </returns>
        public byte[] Encode(OxyColor[,] pixels)
Let me know if it would be a better idea that pixel arrays are indexed as [y,x] or top line first!
Dec 30, 2013 at 3:45 PM
OK, I switched the indexes and everything works fine. Hope you received the PDF book from your Amazon wish list. Thanks again for this library.
Coordinator
Jan 7, 2014 at 9:36 PM
Thank you! I received the book yesterday! I am looking really forward to read it, I find PDF export to be very exciting :) (and I want to learn more about text encoding and font embedding)