raunakbinani / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

Out of memory in abstract_renderer.cls.php, line 150 #72

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
imagefill() function is used there to fill the image with background 
color. Flood fill requires additional memory for queue of pixels. It 
allocates about width*height*4 bytes for some reason. So it fails with out 
of memory error sometimes (try memory_limit=64M, DOMPDF_DPI=300, 
background image 2300*3150 px).
I've replaced imagefill() with imagefilledrectangle() and it works perfect

Original issue reported on code.google.com by levev...@gmail.com on 17 Sep 2009 at 8:09

GoogleCodeExporter commented 9 years ago
very thanks

but i have Wrong parameter count for imagefilledrectangle()

imagefilledrectangle($Ress_Dst, 0, 0, $trans_color);

Original comment by debiais....@gmail.com on 17 Apr 2012 at 12:41

GoogleCodeExporter commented 9 years ago
ok no problem just add 0 and 0 
imagefilledrectangle($Ress_Dst,0,0,0,0,$trans_color);

Original comment by debiais....@gmail.com on 17 Apr 2012 at 12:46

GoogleCodeExporter commented 9 years ago
I think that to get the same result, we need to set the $x2 and $y2 arguments 
to the width and height of the image. Can you confirm this ?

Original comment by fabien.menager on 26 Apr 2012 at 12:26

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 24 May 2013 at 3:00