王朝百科
分享
 
 
 

gluScaleImage

王朝百科·作者佚名  2010-03-06  
宽屏版  字体: |||超大  

gluScaleImage

NAME (函数名称)

gluScaleImage -- scale an image to an arbitrary size (把一个图像任意缩放到一个大小)

C SPECIFICATION(C语言实现示例)

int gluScaleImage(GLenum format,

GLint widthin,

GLint heightin,

GLenum typein,

const void *datain,

GLint widthout,

GLint heightout,

GLenum typeout,

void *dataout)

PARAMETERS(各参数含义):

format:

Specifies the format of the pixel data. The following symbolic values are valid: GL_COLOR_INDEX, GL_STENCIL_INDEX, GL_DEPTH_COMPONENT, GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB, GL_RGBA, GL_LUMINANCE, and GL_LUMINANCE_ALPHA.

(指定像素数据的格式类型,下面是其可选的有效参数:

GL_STENCIL_INDEX, GL_DEPTH_COMPONENT, GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB,

GL_RGBA, GL_LUMINANCE, and GL_LUMINANCE_ALPHA.

widthin, heightin:

Specify the width and height, respectively, of the source image that is scaled.

(指定宽度和高度,各自为要缩放的源图像的高度和宽度)

typein:

Specifies the data type for datain. Must be one of GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, or GL_FLOAT.

(指定要输入的数据的类型,必须是这些参数:GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, or GL_FLOAT.)

datain:

Specifies a pointer to the source image.

(指定了一个指向源程序的指针)

widthout, heightout:

Specify the width and height, respectively, of the destination image.

(这个根据参数名字可以看出,是你想要变化后的图像的高度和宽度的大小)

typeout:

Specifies the data type for dataout. Must be one of GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, or GL_FLOAT.

(指定要输出的数据类型,必须是以下可选参数:GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, or GL_FLOAT.)

dataout:

Specifies a pointer to the destination image.

(指定目的图像指针)

DESCRIPTION(说明):

gluScaleImage scales a pixel image using the appropriate pixel store modes to unpack data from the source image and pack data into the destination image.

(gluScaleImage这个函数用适当的像素存储模式改变一个像素图像的大小来读取源图像的像素数据然后把像素写入新的目标图像)

When shrinking an image, gluScaleImage uses a box filter to sample the source image and create pixels for the destination image. When magnifying an image, the pixels from the source image are linearly interpolated to create the destination image.

(当缩小一个图像时,gluScaleImage这个函数用一个叫box filter(不知到怎么翻译,暂译作过滤器)的东东来取样源图像的数据然后为新目的图像创建新的像素。当放大一个图像的时候,来自源图像的像素以线性插值的方式补充像素来为新目的图像创建像素)

A return value of zero indicates success, otherwise a GLU error code is returned indicating what the problem was (see gluErrorString).

(函数返回0值表示像素缩放成功,若失败则返回一个GLU 错误的字符串,通过这个字符串可以知道错误原因,可以看gluErrorString)

Please refer to the glReadPixels reference page for a description of the acceptable values for the format, typein, and typeout parameters.

(请参考glReadPixels函数的相关参考来查看关于参数tyepin和typeout这两个参数的可接受的类型的描述,或可理解为,如果你想了解更过关于typein和typeout的详情,请参考glReadPixels函数的参考页数,(估计这段英文是来自一本书,初次词条可能只是把原文粘贴过来的))

备注:

本人初次翻译,且是大二学生,如有错误,请指正并自己加以理解。---fairzy

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
如何用java替换看不见的字符比如零宽空格​十六进制U+200B
 干货   2023-09-10
网页字号不能单数吗,网页字体大小为什么一般都是偶数
 干货   2023-09-06
java.lang.ArrayIndexOutOfBoundsException: 4096
 干货   2023-09-06
Noto Sans CJK SC字体下载地址
 干货   2023-08-30
window.navigator和navigator的区别是什么?
 干货   2023-08-23
js获取referer、useragent、浏览器语言
 干货   2023-08-23
oscache遇到404时会不会缓存?
 干货   2023-08-23
linux下用rm -rf *删除大量文件太慢怎么解决?
 干货   2023-08-08
刀郎新歌破世界纪录!
 娱乐   2023-08-01
js实现放大缩小页面
 干货   2023-07-31
生成式人工智能服务管理暂行办法
 百态   2023-07-31
英语学习:过去完成时The Past Perfect Tense举例说明
 干货   2023-07-31
Mysql常用sql命令语句整理
 干货   2023-07-30
科学家复活了46000年前的虫子
 探索   2023-07-29
英语学习:过去进行时The Past Continuous Tense举例说明
 干货   2023-07-28
meta name="applicable-device"告知页面适合哪种终端设备:PC端、移动端还是自适应
 干货   2023-07-28
只用css如何实现打字机特效?
 百态   2023-07-15
css怎么实现上下滚动
 干货   2023-06-28
canvas怎么画一个三角形?
 干货   2023-06-28
canvas怎么画一个椭圆形?
 干货   2023-06-28
canvas怎么画一个圆形?
 干货   2023-06-28
canvas怎么画一个正方形?
 干货   2023-06-28
中国河南省郑州市金水区蜘蛛爬虫ip大全
 干货   2023-06-22
javascript简易动态时间代码
 干货   2023-06-20
感谢员工的付出和激励的话怎么说?
 干货   2023-06-18
 
>>返回首页<<
 
 
静静地坐在废墟上,四周的荒凉一望无际,忽然觉得,凄凉也很美
© 2005- 王朝网络 版权所有