⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 20921.html

📁 以电子书的形式收集了VB一些常见问题解决方法,可以很方便的查找自己需要解决的问题.对一些VB初学者很用.
💻 HTML
字号:
<html>  <head>    <title>如何将Hi-Color转换为Ture-Color??</title>  </head>  <body bgcolor="#FFFFFF" vlink="#808080">    <center>      <h1>如何将Hi-Color转换为Ture-Color??</h1>    </center><hr size=7 width=75%><hr size=7 width=75%><p>Posted by <a href="mailto:ivanlin20@kimo.com.tw">Ivan</a> on November 02, 1999 at 19:26:21:<p>各位先进大家好<p>小弟有一问题想请教~~<p>小弟利用以下程式取得picture1之各Byte之值.欲存成全彩packbits compression压缩之tiff档, 但以下函式于16bits(Hi-Color)下仅能读取到<br>每个点2byte(rrrrrggg|gggbbbbb)之资料,是否有方法可以读取到全彩3byte的资料,或可快速将每个点(2 byte)转换为3byte的方法呢??<p>请各位先进, 指教谢谢!!<p><br>Public Declare Function GetObject Lib "gdi32" Alias "GetObjectA" (ByVal hObject As Long, ByVal nCount As Long, lpObject As Any) As Long<br>Public Declare Function GetBitmapBits Lib "gdi32" (ByVal hBitmap As Long, ByVal dwCount As Long, lpBits As Any) As Long<br>Type Bitmap_DataType<br>     bmType As Long<br>     bmWidth As Long<br>     bmHeight As Long<br>     bmWidthBytes As Long<br>     bmPlanes As Integer<br>     bmBitsPixel As Integer<br>     bmBits As Long<br>End Type<br>Dim hBitmap As Long<br>Dim Ret As Long<br>Dim Bitmap As Bitmap_DataType<br>Dim bBuffer() As Byte<br>Dim TotalByte As Long<br>hBitmap = picture1.image.handle<p>Ret = GetObject(hBitmap, Len(Bitmap), Bitmap)<br>TotalByte = Bitmap.bmWidthBytes * Bitmap.bmHeight<p>ReDim bBuffer(TotalByte - 1)<br>Ret = GetBitmapBits(hBitmap, TotalByte, bBuffer(0))<br><br><br><hr size=7 width=75%><p><a name="followups">Follow Ups:</a><br><ul><!--insert: 20921--></ul><!--end: 20921--><br><hr size=7 width=75%><p></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -