class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
But you can set the background color (use version 0.25 RC1), and set up some margins using image_crop with negative margins, or image_ratio_crop or image_border.
But you can set the background color (use version 0.25 RC1), and set up some margins using image_crop with negative margins, or image_ratio_crop or image_border.
Does it answer your question?