The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled PHP Code
Posted by: T | December 31, 2010 @ 9:40am
PHP Code
[
Download
]
<?php header("Content-type: image/jpeg"); $descriptorspec = array(0 => array("pipe", "r"), 1 => array("pipe", "w")); $convert = proc_open("/usr/bin/convert -quality 100 svg:- jpg:-", $descriptorspec, $pipes); fwrite($pipes[0], "<?xml version=\"1.0\" standalone=\"no\"?><svg width=\"100%\" height=\"100%\" version=\"1.1\"><circle cx=\"100\" cy=\"50\" r=\"40\" stroke=\"black\" stroke-width=\"2\" fill=\"red\"/></svg>"); fclose($pipes[0]); while(!feof($pipes[1])) $jpg .= fread($pipes[1], 1024); fclose($pipes[1]); proc_close($convert); echo $jpg; ?>
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.52 / 8
84 Votes
http://codebin.yi.org/1035
page generated in 0.00 seconds