https://www.php-resource.de/forum/php-developer-forum/55660-memory-problem-mit-bildscript