相似网站
河北高速路况查询网
地铁线路图网
一起看地图网
飞友科技飞常准
路路通地名网
世界地图中文网
地图下载网
铁路之家
地铁321
高速路况网
中国城市交通地图
川内网
VR全景城市
中国城市地图网
高速公路查询网
小小网
乡村地图
交通界网
Mapcarta
Changi Airport
“PixelMap”- 基本信息
  • 进入网站:点击进入
  • 网站地址: pixelmap.amcharts.com
  • 网站名称: PixelMap
  • 网站类型: 旅游出行 - 交通地图
  • 所属地区: 北美洲
  • 更新时间: 2022-04-04
  • 关 键 词 : 像素地图,地图,PixelMap
  • 网站描述:

    PixelMap网站是一个可以字动手制作一张简约的像素地图,适合于展示或者演示世界地图辅助说明,支持添加各种背景颜色、形状等矢量图,支持调整大小间隔,支持添加文字等等。

    PixelMap操作上非常简单,制作完成后可以按GeneratePixelMap产生最后结果,再来依个人需求,按SVG向量图档、HTML网页语法、Image图片储存三种档案格式。

“PixelMap”- 相关资料

glReadPixels

glReadPixels是一个函数。

glReadPixels

NAME

glReadPixels - read a block of pixels from the frame buffer

C SPECIFICATION

void glReadPixels( GLint x, GLint y, GLsizei width,GLsizei height, GLenum format, GLenum type, GLvoid *pixels)

width, height

Specify the dimensions of the pixel rectangle. width and heightof one correspond to a single pixel.

format

Specifies the format of the pixel data. The following symbolic values areaccepted: 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.

type

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

pixels

Returns the pixel data.

DESCRIPTION

glReadPixels returns pixeldata from the frame buffer, starting with the pixel whose lower left corner isat location (x, y), into client memory starting at location pixels.Several parameters control the processing of the pixel data before it is placedinto client memory. These parameters are set with three commands: glPixelStore, glPixelTransfer,and glPixelMap. Thisreference page describes the effects on glReadPixels of most, but notall of the parameters specified by these three commands.

glReadPixels returns valuesfrom each pixel with lower left-hand corner at (x + i, y +j) for 0 ≤ i

format specifies the format for thereturned pixel values. Accepted values for format are as follows:

GL_COLOR_INDEX

Color indices are read from the color buffer selected by glReadBuffer. Eachindex is converted to fixed point, shifted left or right depending on the valueand sign of GL_INDEX_SHIFT, and added to GL_INDEX_OFFSET. If GL_MAP_COLORis GL_TRUE, indices are replaced by their mappings in the table GL_PIXEL_MAP_I_TO_I.

GL_STENCIL_INDEX

Stencil values are read from the stencil buffer. Each index is converted tofixed point, shifted left or right depending on the value and sign of GL_INDEX_SHIFT,and added to GL_INDEX_OFFSET. If GL_MAP_STENCIL is GL_TRUE,indices are replaced by their mappings in the table GL_PIXEL_MAP_S_TO_S.

GL_DEPTH_COMPONENT

Depth values are read from the depth buffer. Each component is converted tofloating point such that the minimum depth value maps to 0.0 and the maximumvalue maps to 1.0. Each component is then multiplied by GL_DEPTH_SCALE,added to GL_DEPTH_BIAS, and finally clamped to the range .

GL_RED

GL_GREEN

GL_BLUE

GL_ALPHA

GL_RGB

GL_RGBA

GL_LUMINANCE

GL_LUMINANCE_ALPHA

Processing differs depending on whether color buffers store color indices orRGBA color components. If color indices are stored, they are read from thecolor buffer selected by glReadBuffer.Each index is converted to fixed point, shifted left or right depending on thevalue and sign of GL_INDEX_SHIFT, and added to GL_INDEX_OFFSET.Indices are then replaced by the red, green, blue, and alpha values obtained byindexing the GL_PIXEL_MAP_I_TO_R, GL_PIXEL_MAP_I_TO_G, GL_PIXEL_MAP_I_TO_B,and GL_PIXEL_MAP_I_TO_A tables.

If RGBA color components are stored in the color buffers, they are read fromthe color buffer selected by glReadBuffer.Each color component is converted to floating point such that zero intensitymaps to 0.0 and full intensity maps to 1.0. Each component is then multipliedby GL_c_SCALE and added to GL_c_BIAS, where c is GL_RED,GL_GREEN, GL_BLUE, and GL_ALPHA. Each component is clampedto the range . Finally, if GL_MAP_COLOR is GL_TRUE, eachcolor component c is replaced by its mapping in the table GL_PIXEL_MAP_c_TO_c,where c again is GL_RED, GL_GREEN, GL_BLUE, and GL_ALPHA.Each component is scaled to the size its corresponding table before the lookupis performed.

Finally, unneeded data is discarded. For example, GL_RED discards thegreen, blue, and alpha components, while GL_RGB discards only the alphacomponent. GL_LUMINANCE computes a single component value as the sum ofthe red, green, and blue components, and GL_LUMINANCE_ALPHA does thesame, while keeping alpha as a second value.

The shift, scale, bias, and lookup factors described above are allspecified by glPixelTransfer.The lookup table contents themselves are specified by glPixelMap.

The final step involves converting the indices or components to the properformat, as specified by type. If format is GL_COLOR_INDEX orGL_STENCIL_INDEX and type is not GL_FLOAT, each index ismasked with the mask value given in the following table. If type is GL_FLOAT,then each integer index is converted to single-precision floating-point format.

Ifformat is GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA,GL_RGB, GL_RGBA, GL_LUMINANCE, or GL_LUMINANCE_ALPHAand type is not GL_FLOAT, each component is multiplied by themultiplier shown in the following table. If type is GL_FLOAT, then eachcomponent is passed as is (or converted to the client's single-precisionfloating-point format if it is different from the one used by the GL).

【中文版】

glReadPixels - 从帧缓存里读取一个像素块

void glReadPixels(GLint x,GLint y,GLsizesi width,GLsizei height,

GLenum format,GLenum type,GLvoid *pixel);

函数参数(x, y)定义图像区域左下角点的坐标,width和height分别是图像的高度和宽度,*pixel是一个指针,指向存储图像数据的数组。参数format指出所读象素数据元素的格式(索引值或R、G、B、A值,如下面表所示),而参数type指出每个元素的数据类型(也见下面表)。

写入象素数据:

void glDrawPixels(GLsizesi width,GLsizei height,GLenum format,

GLenum type,GLvoid *pixel);

函数参数format和type与glReadPixels()有相同的意义,pixel指向的数组包含所要画的象素数据。注意,调用这个函数前必须先设置当前光栅位置,若当前光栅位置无效,则给出该函数时不画任何图形,并且当前光栅位置仍然保持无效。

+++++++++++像素格式表++++++++++++++++++++++

GL_INDEX 单个颜色索引

GL_RGB 先是红色分量,再是绿色分量,然后是蓝色分量

GL_RED 单个红色分量

GL_GREEN 单个绿色分量

GL_BLUE 单个蓝色分量

GL_ALPHA 单个Alpha值

GL_LUMINANCE_ALPHA 先是亮度分量,然后是Alpha值

GL_STENCIL_INDEX 单个的模板索引

GL_DEPTH_COMPONENT 单个深度分量

++++++++++++++++++++++++++++++++++++++++++

+++++++++++++++++++ 数据类型+++++++++++++++++++

GL_UNSIGNED_BYTE 无符号的8位整数

GL_BYTE 8位整数

GL_BITMAP 无符号的8位整数数组中的单个数位

GL_UNSIGNED_SHORT 无符号的16位整数

GL_SHORT 16位整数

GL_UNSIGNED_INT 无符号的32位整数

GL_INT 32位整数

GL_FLOAT 单精度浮点数

+++++++++++++++++++++++++++++++++++++++

图像的每个元素按上面表给出的数据类型存储。若元素表示连续的值,如红、绿、蓝或亮度分量,每个值都按比例放缩使之适合于可用的位数。例如,红色分量是0.0到1.0之 间的浮点值。若它需要放到无符号单字节整数中,也仅有8位精度保存下来,其他无符号整数类型同理。对于有符号的数据类型还要少一位,例如颜色索引存到有符号的8位整数中,它的第一位被0xfe屏蔽掉了(即这个掩码包含7个1)。若类型是GL_FLOAT,索引值简单地转化成单精度浮点值,例如索引17转化成17.0,同理。

联系方式:
邮箱:2518000497@qq.com
QQ:2518000497
网站声明:
本文系本网编辑转载,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如涉及作品内容、版权和其它问题,请在30日内与本网联系,我们将在第一时间删除内容。