Pygame学习(3)-----如何对图像进行翻转,缩放,旋转
2013-07-23 14:19
274 查看
1. pygame.transform.flip(Surface, xbool, ybool) (水平和垂直翻转)
xbool => True 为水平翻转
ybool => True 为垂直翻转
return Surface
2. pygame.transform.scale(Surface, (width, height), DestSurface = None)(缩放)
(width, height): 缩放的大小
returnSurface
3. pygame.transform.rotate(Surface, angle) (旋转)
angle : 旋转角度
returnSurface
______________________________________________________________
模块: pygame.transform
功能: 对图像进行缩放和移动
其他函数:
4.pygame.transform.rotozoom(urface, angle, scale)(经过滤波的缩放和旋转)
5.pygame.transform.scale2x(Surface, DestSurface = None) (特殊的图像2倍放大)
6.pygame.transform.smoothscale(Surface, (width, height), DestSurface = None) (平滑缩放任意大小)
7.pygame.transform.chop(Surface, rect) (图像剪切)
8.pygame.transform.laplacian(Surface, DestSurface = None)
(描边)
9.pygame.transform.average_surfaces(Surfaces,
DestSurface = None, palette_colors = 1)
10.pygame.transform.average_color(Surface, Rect = None)
11.pygame.transform.threshold(DestSurface, Surface, color, threshold = (0,0,0,0), diff_color = (0,0,0,0), change_return = 1, Surface = None, inverse
= False)
以上 return Surface
12.pygame.transform.get_smoothscale_backend() (返回smoothscale过滤版本)
return string
13.pygame.transform.set_smoothscale_backend(type) (设置smoothscale过滤版本)
return None
xbool => True 为水平翻转
ybool => True 为垂直翻转
return Surface
2. pygame.transform.scale(Surface, (width, height), DestSurface = None)(缩放)
(width, height): 缩放的大小
returnSurface
3. pygame.transform.rotate(Surface, angle) (旋转)
angle : 旋转角度
returnSurface
______________________________________________________________
模块: pygame.transform
功能: 对图像进行缩放和移动
其他函数:
4.pygame.transform.rotozoom(urface, angle, scale)(经过滤波的缩放和旋转)
5.pygame.transform.scale2x(Surface, DestSurface = None) (特殊的图像2倍放大)
6.pygame.transform.smoothscale(Surface, (width, height), DestSurface = None) (平滑缩放任意大小)
7.pygame.transform.chop(Surface, rect) (图像剪切)
8.pygame.transform.laplacian(Surface, DestSurface = None)
(描边)
9.pygame.transform.average_surfaces(Surfaces,
DestSurface = None, palette_colors = 1)
10.pygame.transform.average_color(Surface, Rect = None)
11.pygame.transform.threshold(DestSurface, Surface, color, threshold = (0,0,0,0), diff_color = (0,0,0,0), change_return = 1, Surface = None, inverse
= False)
以上 return Surface
12.pygame.transform.get_smoothscale_backend() (返回smoothscale过滤版本)
return string
13.pygame.transform.set_smoothscale_backend(type) (设置smoothscale过滤版本)
return None
相关文章推荐
- Python-OpenCv之图像基本处理-平移,缩放,旋转,翻转,裁剪及仿射变换
- python中Image类处理图像 缩放、旋转与翻转
- 【学习opencv】对图像缩放并进行边缘检测
- iOS 使用手势UIGestureRecognizer对图像进行缩放、移动、旋转等操作
- iOS 使用手势UIGestureRecognizer对图像进行缩放、移动、旋转操作
- html5学习笔记三:canvas中平移,缩放,旋转等图像变换问题
- 25.Android之图像的平移、旋转及缩放学习
- [Android] 使用Matrix矩阵类对图像进行缩放、旋转、对比度、亮度处理
- 如何使用Matrix对象旋转和缩放图像
- UIGestureRecognizer对图像进行缩放、移动、旋转操作
- UIGestureRecognizer对图像进行缩放、移动、旋转操作
- iOS 使用手势UIGestureRecognizer对图像进行缩放、移动、旋转等操作
- php图像处理函数大全(缩放、剪裁、缩放、翻转、旋转、透明、锐化的实例总结)
- 今天学习Flex3.2嵌入图片,值得说道的是如何嵌入scale-9 缩放的图像
- imresize函数进行图像缩放及利用imrotate进行图像旋转
- 【OpenCV学习笔记】【编程实例】二(图像的旋转和翻转)
- php图像处理(缩放、剪裁、缩放、翻转、旋转、透明、锐化)
- Qwt中动态绘图时如何将当前图像作为原始态进行缩放操作
- php图像处理函数大全(缩放、剪裁、缩放、翻转、旋转、透明、锐化的实例总结)
- 【J2me3D系列学习文章之三】(立即模式)对立方体进行变换操作-旋转、缩放、平移