0
A
回答
3
您正在寻找imagerectangle()
:
// Load the image
$img = imagecreatefrompng("image.png"); // or imagecreatefromjpeg(), etc.
// Set a colour for the sides of the rectangle
$color = imagecolorallocate($img, 255, 255, 255); // for a white rectangle
// Draw an 8x8 recangle at coordinates ($x, $y) from top left
imagerectangle($img, $x, $y, $x+8, $y+8, $color);
// Or, use imagefilledrectangle() with the same arguments if you want it filled
// Save the image
imagepng($img, "image.png"); // or imagejpeg(), etc.
相关问题
- 1. 如何在图像上绘制图像?
- 2. 在2D图像上绘制网格cocos3d
- 3. 如何在surfaceview上绘制图像android
- 4. 如何在Plots.jl上绘制图像?
- 5. 如何在圆圈上绘制图像
- 6. 如何在屏幕上绘制图像?
- 7. flex如何在图像上绘制
- 8. 如何在窗口上绘制图像?
- 9. 如何绘制图像的直方图?
- 10. 在matlab中,如何在图像上绘制网格
- 11. 为什么JPEG编码8x8方格图像会产生伪像?
- 12. 在绘图区域上绘制图像
- 13. 如何在Silverlight中的网格上绘制图像?
- 14. 在图像上绘制
- 15. 在win32上绘制图像?
- 16. 在图像上绘制点
- 17. Android - 在图像上绘制
- 18. 在JButton上绘制图像?
- 19. 绘制2D:在网格布局图上绘制网格图
- 20. 如何绘制图像上的文字
- 21. 如何在另一幅图像上绘制图像?
- 22. 如何在图像上下文中绘制图像和文本?
- 23. PHP:如何在另一幅图像上绘制图像?
- 24. 如何在图像上绘制线条/绘画?
- 25. 如何在图像中绘制Qwt图
- 26. 我试图制作C数组,绘制8x8 chesstable.请帮我吗?
- 27. Matlab。如何绘制图像
- 28. matplotlib:如何绘制图像
- 29. 如何绘制图像
- 30. 如何绘制swt图像?
PHP imagick!将图像路径传递给新的imagick实例,绘制矩形writeImage,完成。 – markus 2009-12-06 10:51:41