Ugh, I don't know about this. I've tried ob_clean() at the start of the template, and disabling all helpers, components, and models just to see if those were the problem, and I'm still getting one line of whitespace.
On Oct 12, 12:18 pm, "Samuel DeVore" <[EMAIL PROTECTED]> wrote: > I was thinking before you start to output your image data do > ob_clean(); > > seehttp://us3.php.net/manual/en/function.ob-clean.php > > the thing is the sample code works for me in a virgin project with the > current cake version. So my guess is that you have a extra line feed > somewhere, but tracking it down might be very difficult. They are > somewhere, I wonder if someone has any tricks to find them? some > awk/sed magician in the house perhaps > > On 10/12/06, tom <[EMAIL PROTECTED]> wrote: > > > > > > > Not sure what you mean? > > > On Oct 12, 11:20 am, "Samuel DeVore" <[EMAIL PROTECTED]> wrote: > > > clear the buffer first? > > > > On 10/12/06, tom <[EMAIL PROTECTED]> wrote: > > > > > Hmm.. no whitespace in any of the default helpers or components, or any > > > > of the helpers & components I've installed, or in any of the default > > > > config files. > > > > > I tried output buffering in the view (and using trim()), but the > > > > whitespace is before that. What else is there to do? > > > > > On Oct 12, 11:01 am, "Samuel DeVore" <[EMAIL PROTECTED]> wrote: > > > > > Right but it could be in a helper, a component, a config file, a .... > > > > > > you might also try using output control > > > > > buffershttp://us2.php.net/manual/en/ref.outcontrol.php > > > > > > On 10/12/06, tom <[EMAIL PROTECTED]> wrote: > > > > > > > I had noticed that before and checked: no newlines before <?php on > > > > > > runs_controller or the view (graph.thtml) > > > > > > > The view code is > > > > > > > <?php > > > > > > header("Content-type: image/png"); > > > > > > $im = @imagecreate(100, 50) > > > > > > or die("Cannot Initialize new GD image stream"); > > > > > > $background_color = imagecolorallocate($im, 255, 255, 255); > > > > > > $text_color = imagecolorallocate($im, 233, 14, 91); > > > > > > imagestring($im, 1, 5, 5, $data, $text_color); > > > > > > imagepng($im); > > > > > > imagedestroy($im); > > > > > > ?> > > > > > > > On Oct 12, 4:30 am, "meek" <[EMAIL PROTECTED]> wrote: > > > > > > > Looking at the image source, I'm pretty sure there's some extra > > > > > > > whitespace in there. - two newlines before the 'PNG' is outputted. > > > > > > > Maybe you have some newlines outwith the <?php ?> tags?-- > > > > > == > > > > > S. DeVore > > > > > (the old fart) the advice is free, the lack of crankiness will cost > > > > > you-- > > > == > > > S. DeVore > > > (the old fart) the advice is free, the lack of crankiness will cost you-- > == > S. DeVore > (the old fart) the advice is free, the lack of crankiness will cost you --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---
