I'm working on a PHP web-based client for a server that I'm also developing. The PHP client needs to be able to retrieve an image from the server who sends it as raw RGB data in message chunks. The problem I'm having is displaying the image to the user using PHP. I've been using Gd but since there's no direct access to the raw RGB data of the image to write to I can only use the Gd equivalent of putpixel. This has turned out to be FAR too slow. It seems that Gd was really intended only to generate images by drawing them with primitives such as lines for simple images like graphs instead of displaying complex, high-colour images. The result using Gd is that small images take a very long time to display and any larger images cause the PHP script to be killed by Apache for running over the execution time limit. Are there any alternatives that are more suited direct image manipulation?