Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Windows 8.1, 10, WindowsPhone, Windows UWP

NewImageJPEG always returns nullptr

More
IP: 192.168.0.71 11 years 9 months ago - 11 years 9 months ago #6701 by Einstein
Code:
PDFMatrix mat = new PDFMatrix(m_scale, -m_scale, 0, m_dibh);
In which units should m_dibh be specified? I discovered that if I put my document's height converted to device-independent pixels (DIP), the generated image is positioned too low.

When trying to render a 1405 x 1987 image, with the identity matrix, the point x: 0, y: 0 in not in the left bottom corner but somewhere on the left edge.
Last edit: 11 years 9 months ago by tien4720.
More
IP: 192.168.0.71 11 years 9 months ago #6703 by radaee
full codes like this:
Code:
m_dibw = m_scale * Page.Width;//Page.Width is in PDF coordinate. m_dibh = m_scale * Page.Height//Page.Height is in PDF coordinate. Matrix mat = new Matrix( m_scale, -m_scale, 0, m_dinh ); m_dib_tmp = new WriteableBitmap(m_dibw, m_dibh); int[] pixels = m_dib_tmp.Pixels; Page.Render(pixels, m_dibw, m_dibh, mat, true, PDFView.renderQuality);
Time to create page: 0.433 seconds
Powered by Kunena Forum