全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1778
推到 Plurk!
推到 Facebook!

如何才能修改位圖分辨率或尺寸?

尚未結案
tiger18504
一般會員


發表:10
回覆:7
積分:3
註冊:2004-09-13

發送簡訊給我
#1 引用回覆 回覆 發表時間:2004-09-19 12:19:59 IP:211.250.xxx.xxx 未訂閱
那位delphi高手可以告所我。處理完位圖后,如何才能修改分辨率或尺寸(厘米或英寸),然后保存呢? 先谢谢……
wameng
版主


發表:31
回覆:1336
積分:1188
註冊:2004-09-16

發送簡訊給我
#2 引用回覆 回覆 發表時間:2004-09-20 12:50:22 IP:61.222.xxx.xxx 未訂閱
BMP.Width BMP.Height 改變圖的大小後用 用 StretchBlt
tiger18504
一般會員


發表:10
回覆:7
積分:3
註冊:2004-09-13

發送簡訊給我
#3 引用回覆 回覆 發表時間:2004-09-20 14:30:45 IP:220.112.xxx.xxx 未訂閱
{这个是photoshop的修改图片大小的界面} 首先谢谢您 wameng! { BMP.Width BMP.Height 改變圖的大小後用 用 StretchBlt } 圖像素值被改变了啊~~,可不可以不改像素值只修改分辨率呢?当然,改后的圖象尺寸是改变了的(厘米或英寸)。 {我是想可不可以象上面那样修改,比如保持像素不变,只改变分辨率}
wameng
版主


發表:31
回覆:1336
積分:1188
註冊:2004-09-16

發送簡訊給我
#4 引用回覆 回覆 發表時間:2004-09-20 16:41:02 IP:61.222.xxx.xxx 未訂閱
SetBitmapDimensionEx The SetBitmapDimensionEx function assigns preferred dimensions to a bitmap. These dimensions can be used by applications; however, they are not used by the system. BOOL SetBitmapDimensionEx( HBITMAP hBitmap, // handle to bitmap int nWidth, // bitmap width in .01-mm units int nHeight, // bitmap height in .01-mm units LPSIZE lpSize // original dimensions ); Parameters hBitmap [in] Handle to the bitmap. The bitmap cannot be a DIB-section bitmap. nWidth [in] Specifies the width, in 0.1-millimeter units, of the bitmap. nHeight [in] Specifies the height, in 0.1-millimeter units, of the bitmap. lpSize [out] Pointer to a SIZE structure to receive the previous dimensions of the bitmap. This pointer can be NULL. Return Values If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. Windows NT/2000/XP: To get extended error information, call GetLastError. Remarks An application can retrieve the dimensions assigned to a bitmap with the SetBitmapDimensionEx function by calling the GetBitmapDimensionEx function. The bitmap identified by hBitmap cannot be a DIB section, which is a bitmap created by the CreateDIBSection function. If the bitmap is a DIB section, the SetBitmapDimensionEx function fails. Requirements Windows NT/2000/XP: Included in Windows NT 3.1 and later. Windows 95/98/Me: Included in Windows 95 and later. Header: Declared in Wingdi.h; include Windows.h. Library: Use Gdi32.lib.
tiger18504
一般會員


發表:10
回覆:7
積分:3
註冊:2004-09-13

發送簡訊給我
#5 引用回覆 回覆 發表時間:2004-09-20 20:28:16 IP:220.112.xxx.xxx 未訂閱
能否直接修改位圖文件头信息来修改分辨率(圖象尺寸)呢?
wameng
版主


發表:31
回覆:1336
積分:1188
註冊:2004-09-16

發送簡訊給我
#6 引用回覆 回覆 發表時間:2004-09-21 17:24:50 IP:61.222.xxx.xxx 未訂閱
SetBitmapDimensionEx(B.Handle,1000,1000*P,nil); 試試看! 我對這個API 不是很熟悉!
系統時間:2024-04-29 15:06:28
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!