Skip to content

Commit

Permalink
fix extra black area on saving bmp
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Jan 7, 2024
1 parent 90c0594 commit 97033de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@
- 2024-01-04 ver.5.1.4
- Displayed the area of the board.
- Enhanced status bar to display policy value and dictionary name etc.
- 2024-XX-YY ver.5.1.5
- 2024-01-07 ver.5.1.5
- Fixed an issue where extra black area were created when saving a bitmap.

# 開発履歴 (Japanese)

Expand Down Expand Up @@ -838,4 +839,5 @@
- 2024年01月04日 ver.5.1.4
- 盤面の面積を表示。
- ステータスバーを強化し、ポリシーの値と辞書名などを表示。
- 2024年XX月YY日 ver.5.1.5
- 2024年01月07日 ver.5.1.5
- ビットマップ保存時に余分な黒い領域ができるのを修正。
4 changes: 2 additions & 2 deletions XWordGiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5744,8 +5744,8 @@ HBITMAP __fastcall XgCreateXWordImage(const XG_Board& xw, const SIZE *psiz, bool
LPVOID pvBits;
ZeroMemory(&bi, sizeof(BITMAPINFOHEADER));
bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bi.bmiHeader.biWidth = psiz->cx * 3 / 2; // 少し余裕を持たせる。
bi.bmiHeader.biHeight = psiz->cy * 3 / 2; // 少し余裕を持たせる。
bi.bmiHeader.biWidth = psiz->cx;
bi.bmiHeader.biHeight = psiz->cy;
bi.bmiHeader.biPlanes = 1;
bi.bmiHeader.biBitCount = 24;
HBITMAP hbm = ::CreateDIBSection(hdc, &bi, DIB_RGB_COLORS, &pvBits, nullptr, 0);
Expand Down

0 comments on commit 97033de

Please sign in to comment.