Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision |
en:create:functions:imagepng_embed [02.12.2014 10:55] – alexander.ritter | en:create:functions:imagepng_embed [02.12.2014 16:38] – alexander.ritter |
---|
''void **imagepng_embed**(resource //image//)'' | ''void **imagepng_embed**(resource //image//)'' |
| |
PHP provides a range of [[http://php.net/manual/en/ref.image.php|image functions]] to create or edit graphics dynamically. User-defined graphs can be created in this way. The problem when using images is that they must be saved in a separate file before they can be displayed in the questionnaire -- afterwards, care must be taken to delete these temporary files. | PHP has a range of [[http://php.net/manual/en/ref.image.php|image functions]] available to create or edit graphics dynamically. Custom diagrams can be created in this way. The problem when using images is that they must be saved in a separate file before they can be displayed in the questionnaire -- afterwards, care must be taken to delete these temporary files. |
| |
The function ''imagepng_embed()'' solves this problem by using a [[http://en.wikipedia.org/wiki/Data-URL|Data URL]]. In doing so, an image file is not referenced in the typical HTML way, but rather directly integrated in the HTML code of the page. The function places the image in the exact place it is called up by using an ''<img>'' tag . | The function ''imagepng_embed()'' solves this problem by using a [[http://en.wikipedia.org/wiki/Data-URL|Data URL]]. In doing so, an image file is not referenced in the typical HTML way, but rather integrated directly into the HTML code of the page. The function places the image in the exact place it is called up by using an ''<img>'' tag . |
| |
* //image// A PHP resource, created using ''[[http://php.net/manual/en/function.imagecreatefrompng.php|imagecreatefrompng()]]'' or ''[[http://www.php.net/manual/en/function.imagecreate.php|imagecreate()]]''. | * //image// A PHP resource, created using ''[[http://php.net/manual/en/function.imagecreatefrompng.php|imagecreatefrompng()]]'' or ''[[http://www.php.net/manual/en/function.imagecreate.php|imagecreate()]]''. |