Top-Down和Bottom-Up位图的区别
Top-Down vs. Bottom-Up DIBs
If you are new to graphics programming, you might expect that a bitmap would be arranged in memory so that the top row of the image appeared at the start of the buffer, followed by the next row, and so forth. However, this is not necessarily the case. In Windows, device-independent bitmaps (DIBs) can be placed in memory in two different orientations, bottom-up and top-down.
In a bottom-up DIB, the image buffer starts with the bottom row of pixels, followed by the next row up, and so forth. The top row of the image is the last row in the buffer. Therefore, the first byte in memory is the bottom-left pixel of the image. In GDI, all DIBs are bottom-up. The following diagram shows the physical layout of a bottom-up DIB.
在一个bottom-up位图中,图像的缓冲区从底层行的像素开始,图像的顶层行是图像缓冲区的最后一行。因此,内存的第一个字节是指向图像左下角的像素。在GDI中,所有的设备无关位图都是bottom-up类型,下图表示了一个bottom-up位图的物理排列顺序。
![]()
In a top-down DIB, the order of the rows is reversed. The top row of the image is the first row in memory, followed by the next row down. The bottom row of the image is the last row in the buffer. With a top-down DIB, the first byte in memory is the top-left pixel of the image. DirectDraw uses top-down DIBs. The following diagram shows the physical layout of a top-down DIB:
在一个top-down位图中,行的顺序是相反的。
![]()
For RGB DIBs, the image orientation is indicated by the biHeight member of the BITMAPINFOHEADER structure. If biHeight is positive, the image is bottom-up. IfbiHeight is negative, the image is top-down.
DIBs in YUV formats are always top-down, and the sign of the biHeight member is ignored. Decoders should offer YUV formats with positive biHeight, but they should also accept YUV formats with negative biHeight and ignore the sign.
Also, any DIB type that uses a FOURCC in the biCompression member, should express its biHeight as a positive number no matter what its orientation is, since theFOURCC itself identifies a compression scheme whose image orientation should be understood by any compatible filter.
Top-Down和Bottom-Up位图的区别的更多相关文章
- linux系统/proc/stat信息与top的cup信息的联系及区别
一. /proc 目录 Linux系统上的/proc目录是一种文件系统,即proc文件系统,与其它常见的文件系统不同的是,/proc文件系统是一个伪文件系统,它只存在内存当中,而不占用外存空间.它以文 ...
- Altium Designer16 如何分别导出TOP层和BOTTOM层
版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明. 作者:struct_mooc 博客地址:https://www.cnblogs.com/stru ...
- back to top & back to bottom
back to top & back to bottom infinite auto load more & infinite scroll & load more https ...
- menu({postion:{my:"left top"},at:"right bottom"})里的my与at会冲突吗
my(默认值:"center")类型:String描述:定义被定位元素上对准目标元素的位置:"horizontal vertical" 对齐方式.一个单一的值, ...
- 每天CSS学习之top/left/right/bottom
top:值域是数值或百分比,正负都可以.该值表示 距离顶部有多少像素.例如top:10px:即距离顶部10个像素. left/right/bottom与top如出一辙,只是方向不一样而已. 这些属性一 ...
- select top 1 和select top 1 with ties * from SC 的区别
select top1 : * FROM SC ORDER BY score DESC 运行结果如下: sc表数据查询select top 1 S# C# Score 001 03 120 WITH ...
- css top,right,bottom,left设置为0有什么用?它和width:100%和height:100%有什么区别?
壹 ❀ 引 当我们使用position属性时,总免不了与top,left,right,bottom四个属性打交道,那么这四个属性都设置为0时有什么用,与宽高设置100%又有什么区别?本文对此展开讨论 ...
- (四)学习CSS之position、bottom、left、right和top属性
参考:http://www.w3school.com.cn/cssref/pr_class_position.asp position 属性规定元素的定位类型. 这个属性定义建立元素布局所用的定位机制 ...
- css 样式中 margin padding和top类定位的区别
1 margin margin 是外边距的意思,是边框到外部另一元素之间的距离,允许使用负值 语法结构: margin:5px auto; 意思上下为5,左右平均居中 ...
随机推荐
- Linux-内存进程和软件安装
1 swap分区 swapon -s 查看swap分区 mkswap 某分区挂载点 swapon -a 分区 激活该swap swapoff 挂载点 取消swap分区 2 内存 free 查看内存空间 ...
- POJ3061 Subsequence
Subsequence Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 16520 Accepted: 7008 Desc ...
- bzoj2257瓶子与燃料——最大公约数
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2257 可以知道最终能够导出的燃料一定是瓶子容量的gcd的倍数,所以此题转化为求n个数中k个数 ...
- poj3070 求斐波那契数列第n项 ——矩阵快速幂
题目:http://poj.org/problem?id=3070 用矩阵快速幂加速递推. 代码如下: #include<iostream> #include<cstdio> ...
- 免证书发布ipa文件真机测试
首先设备得越狱 众所周知,在Xcode上开发的程序只能在模拟器中运行,如果要放到真机上则要花费99美金购买开发者证书iDP.这严重阻碍了我等草根开发者探索的脚步.写个小程序,同学间分享一下这个小小的愿 ...
- Valera and Swaps
题意: 定义 $f(p)$ 表示将 $p$ 序列变换为有序序列最少要交换多少次,给一 $1 \sim n$ 的排列 $a$ ,给一整数 $m$, 求问将 $a$ 最少交换多少次能得到 $p$ ,使得 ...
- 1.1-1.4 hadoop调度框架和oozie概述
一.hadoop调度框架 Linux Crontab Azkaban https://azkaban.github.io/ Oozie http://oozie.apache.org/ Zeus(阿里 ...
- easyui datagrid 列对不齐
function initBIRDataGrid(id,cols){ $('#basicTable').datagrid({ //列表区域 pageList: [5, 10, 15], fit:tru ...
- XP系统显示控件异常解决方法
XP下显示WPF控件异常,一般通过关闭Direct 3D加速即可.1.按“WIN”+R键,在“运行”输入框中输入“dxdiag”:2.在DirectX诊断工具”对话框,选择“显示”页面,在“Direc ...
- TP5之发送邮件
1.下载扩展,vendor\phpmailer 文件结构: 2.话不多说,上代码 注意点: · 需要提前开通对应邮箱的SMTP服务 · $mail->Host = " & ...