Opened 14 years ago
Closed 14 years ago
#3410 closed defect (fixed)
php mapscript saveImage() to file still writes to stdout
Reported by: | warmerdam | Owned by: | aboudreault |
---|---|---|---|
Priority: | normal | Milestone: | 6.0 release |
Component: | MapScript-PHP | Version: | svn-trunk (development) |
Severity: | normal | Keywords: | |
Cc: | dmorissette |
Description
The script:
<?php //phpinfo(); dl("php_mapscript.so"); $map = ms_newMapObj("test.map"); // print $map->numlayers; $img = $map->draw(); $img->saveImage("out.png",$map); ?>
working against trunk is resulting in the file out.png being written and then the png encoded again and written to stdout. Is it supposed to do this? I get the impression from the docs that it should not. The problem seems to be a missing return in the save to file case in saveImage. The attached patch seems to correct the issue. I hesitate to toapply it since I'm afraid I'm missing something.
Attachments (1)
Change History (3)
by , 14 years ago
comment:1 by , 14 years ago
Cc: | added |
---|---|
Milestone: | → 6.0 release |
Owner: | changed from | to
I think you're right. This code has just been rewritten by Alan, so I'll let him test and apply the fix.
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks warmerdam.
Fixed and comitted in r10038.
fix saveImage problem.