PNG encoder changes?

Dec 16, 2013 at 6:25 PM
Can you explain the recent PNG encoder changes? My image is now rotated 90 degrees clockwise from previous.
Dec 16, 2013 at 7:55 PM
I think this is related to the breaking change applied 2013-11-14:
(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 2: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.
Jan 7, 2014 at 8: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)