I'm trying to get imagegrabscreen
(a GD function) to work with my Apache/Vista PC.
I'm using the following code:
<?php
$im = imagegrabscreen();
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
?>
At the moment I get a solid black image, the size of my secondary monitor (1024*768). I'm using Apache 2.2, runing as a service, Vista SP1 with UAC off, PHP 5.2.8 and GD (information below). I've followed the note on the imagegrabscreen
page about allowing Apache access to the desktop. I've also restarted the service and the apache server. I get the same results with imagegrabwindow
.
Is this a bug (do other people have trouble running this method?) or is there something I'm doing wrong?
Array
(
[GD Version] => bundled (2.0.34 compatible)
[FreeType Support] => 1
[FreeType Linkage] => with freetype
[T1Lib Support] => 1
[GIF Read Support] => 1
[GIF Create Support] => 1
[JPG Support] => 1
[PNG Support] => 1
[WBMP Support] => 1
[XPM Support] =>
[XBM Support] => 1
[JIS-mapped Japanese Font Support] =>
)
Apache Service Log On details:
http://www.kalleload.net/uploads/maogfnfnczfh.png http://www.kalleload.net/uploads/maogfnfnczfh.png
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…