JonnoTheDev Posted November 6, 2008 Share Posted November 6, 2008 When using FPDF and inserting an image of png format into the document, the image looks pixelated. By not setting the height and width the image size should automatically be calculated. I get the same results if I set the image size. $pdf->Image('logo.png',0,0,0,0); Has anyone had this issue? Quote Link to comment https://forums.phpfreaks.com/topic/131621-fpdf-images/ Share on other sites More sharing options...
corbin Posted November 6, 2008 Share Posted November 6, 2008 From looking at the code, it seems to assume PNGs are 72 DPI. Is yours? Quote Link to comment https://forums.phpfreaks.com/topic/131621-fpdf-images/#findComment-684170 Share on other sites More sharing options...
JonnoTheDev Posted November 7, 2008 Author Share Posted November 7, 2008 Unsure, im not really a graphics person. I exported the image as a PNG 24 using Fireworks. 595px x 31px to fit landscape on A5 PDF. Quote Link to comment https://forums.phpfreaks.com/topic/131621-fpdf-images/#findComment-684422 Share on other sites More sharing options...
Mchl Posted November 7, 2008 Share Posted November 7, 2008 595 x 31px is almost certainly too small to look good after stretched to A5. Some calculations: landscape A5 width is 210mm, so with 595pixels it's just under 3 dots/mm... Not enough for print material. The image I use for background on portrait A4 is 1062x695px in 120 dpi. (1062 being width, so the same as width of landscape A5). Looks good with these settings (some pixelation still visible, but it's background watermark, so I don't care that much). Quote Link to comment https://forums.phpfreaks.com/topic/131621-fpdf-images/#findComment-684444 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.