source: trunk/src/gdi32/dibsect.cpp@ 3356

Last change on this file since 3356 was 3356, checked in by sandervl, 25 years ago

y inversion fix for dib blits

File size: 18.4 KB
Line 
1/* $Id: dibsect.cpp,v 1.26 2000-04-09 11:10:34 sandervl Exp $ */
2
3/*
4 * GDI32 DIB sections
5 *
6 * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
7 * Copyright 1998 Patrick Haller
8 *
9 * Project Odin Software License can be found in LICENSE.TXT
10 *
11 * NOTE:
12 * This is not a complete solution for CreateDIBSection, but enough for Quake 2!
13 *
14 */
15#define INCL_GPI
16#define INCL_WIN
17#include <os2wrap.h> //Odin32 OS/2 api wrappers
18#include <stdlib.h>
19#include <string.h>
20#include <win32type.h>
21#include <misc.h>
22#define OS2_ONLY
23#include "dibsect.h"
24#include <vmutex.h>
25#include <win32api.h>
26#include <winconst.h>
27#include <win32wnd.h>
28#include <cpuhlp.h>
29#include "oslibgpi.h"
30#include "rgbcvt.h"
31
32#define DBG_LOCALLOG DBG_dibsect
33#include "dbglocal.h"
34
35static VMutex dibMutex;
36
37//******************************************************************************
38//******************************************************************************
39DIBSection::DIBSection(BITMAPINFOHEADER_W *pbmi, char *pColors, DWORD iUsage, DWORD hSection, DWORD dwOffset, DWORD handle, int fFlip)
40 : bmpBits(NULL), pOS2bmp(NULL), next(NULL), bmpBitsRGB565(NULL)
41{
42 bmpsize = pbmi->biWidth;
43 /* @@@PH 98/06/07 -- high-color bitmaps don't have palette */
44
45 this->fFlip = fFlip;
46 os2bmphdrsize = sizeof(BITMAPINFO2);
47
48 switch(pbmi->biBitCount)
49 {
50 case 1:
51 bmpsize = ((bmpsize + 31) & ~31) / 8;
52 os2bmphdrsize += ((1 << pbmi->biBitCount)-1)*sizeof(RGB2);
53 break;
54 case 4:
55 bmpsize = ((bmpsize + 7) & ~7) / 2;
56 os2bmphdrsize += ((1 << pbmi->biBitCount)-1)*sizeof(RGB2);
57 break;
58 case 8:
59 os2bmphdrsize += ((1 << pbmi->biBitCount)-1)*sizeof(RGB2);
60 bmpsize = (bmpsize + 3) & ~3;
61 break;
62 case 16:
63 bmpsize *= 2;
64 bmpsize = (bmpsize + 3) & ~3;
65 break;
66 case 24:
67 bmpsize *= 3;
68 bmpsize = (bmpsize + 3) & ~3;
69 break;
70 case 32:
71 bmpsize *= 4;
72 break;
73 default:
74 dprintf(("Unsupported nr of bits %d", pbmi->biBitCount));
75 DebugInt3();
76 break;
77 }
78
79 this->hSection = hSection;
80 if(hSection) {
81 bmpBits = (char *)MapViewOfFile(hSection, FILE_MAP_ALL_ACCESS_W, 0, dwOffset, bmpsize*pbmi->biHeight);
82 if(!bmpBits) {
83 dprintf(("Dibsection: mapViewOfFile %x failed!", hSection));
84 DebugInt3();
85 }
86 }
87 if(!bmpBits) {
88 DosAllocMem((PPVOID)&bmpBits, bmpsize*pbmi->biHeight, PAG_READ|PAG_WRITE|PAG_COMMIT);
89 }
90 memset(bmpBits, 0, bmpsize*pbmi->biHeight);
91
92 pOS2bmp = (BITMAPINFO2 *)malloc(os2bmphdrsize);
93
94 memset(pOS2bmp, /* set header + palette entries to zero */
95 0,
96 os2bmphdrsize);
97
98 pOS2bmp->cbFix = sizeof(BITMAPINFO2) - sizeof(RGB2);
99 pOS2bmp->cx = pbmi->biWidth;
100 pOS2bmp->cy = pbmi->biHeight;
101 pOS2bmp->cPlanes = pbmi->biPlanes;
102 pOS2bmp->cBitCount = pbmi->biBitCount;
103 pOS2bmp->ulCompression = pbmi->biCompression;
104 //SvL: Ignore BI_BITFIELDS type (GpiDrawBits fails otherwise)
105 if(pOS2bmp->ulCompression == BI_BITFIELDS) {
106 pOS2bmp->ulCompression = 0;
107 }
108 pOS2bmp->cbImage = pbmi->biSizeImage;
109 dprintf(("handle %x", handle));
110 dprintf(("pOS2bmp->cx %d\n", pOS2bmp->cx));
111 dprintf(("pOS2bmp->cy %d\n", pOS2bmp->cy));
112 dprintf(("pOS2bmp->cPlanes %d\n", pOS2bmp->cPlanes));
113 dprintf(("pOS2bmp->cBitCount %d\n", pOS2bmp->cBitCount));
114 dprintf(("pOS2bmp->ulCompression %d\n", pOS2bmp->ulCompression));
115 dprintf(("pOS2bmp->cbImage %d\n", pOS2bmp->cbImage));
116 dprintf(("Bits at %x, size %d",bmpBits, bmpsize*pbmi->biHeight));
117
118 // clear DIBSECTION structure
119 memset(&dibinfo, 0, sizeof(dibinfo));
120
121 // copy BITMAPINFOHEADER data into DIBSECTION structure
122 memcpy(&dibinfo.dsBmih, pbmi, sizeof(*pbmi));
123 dibinfo.dsBm.bmType = 0;
124 dibinfo.dsBm.bmWidth = pbmi->biWidth;
125 dibinfo.dsBm.bmHeight = pbmi->biHeight;
126 dibinfo.dsBm.bmWidthBytes= bmpsize;
127 dibinfo.dsBm.bmPlanes = pbmi->biPlanes;
128 dibinfo.dsBm.bmBitsPixel = pbmi->biBitCount;
129 dibinfo.dsBm.bmBits = bmpBits;
130
131 dibinfo.dshSection = handle;
132 dibinfo.dsOffset = 0; // TODO: put the correct value here (if createdibsection with file handle)
133
134 if(iUsage == DIB_PAL_COLORS || pbmi->biBitCount <= 8)
135 {
136 dibinfo.dsBitfields[0] = dibinfo.dsBitfields[1] = dibinfo.dsBitfields[2] = 0;
137 }
138 else {
139 switch(pbmi->biBitCount)
140 {
141 case 16:
142 dibinfo.dsBitfields[0] = (pbmi->biCompression == BI_BITFIELDS) ? *(DWORD *)pColors : 0x7c00;
143 dibinfo.dsBitfields[1] = (pbmi->biCompression == BI_BITFIELDS) ? *((DWORD *)pColors + 1) : 0x03e0;
144 dibinfo.dsBitfields[2] = (pbmi->biCompression == BI_BITFIELDS) ? *((DWORD *)pColors + 2) : 0x001f;
145
146 //double buffer for rgb 555 dib sections (for conversion)
147 if(dibinfo.dsBitfields[1] == 0x03e0) {
148 DosAllocMem((PPVOID)&bmpBitsRGB565, bmpsize*pbmi->biHeight, PAG_READ|PAG_WRITE|PAG_COMMIT);
149 }
150 break;
151
152 case 24:
153 dibinfo.dsBitfields[0] = 0xff;
154 dibinfo.dsBitfields[1] = 0xff00;
155 dibinfo.dsBitfields[2] = 0xff0000;
156 break;
157
158 case 32:
159 dibinfo.dsBitfields[0] = (pbmi->biCompression == BI_BITFIELDS) ? *(DWORD *)pColors : 0xff;
160 dibinfo.dsBitfields[1] = (pbmi->biCompression == BI_BITFIELDS) ? *((DWORD *)pColors + 1) : 0xff00;
161 dibinfo.dsBitfields[2] = (pbmi->biCompression == BI_BITFIELDS) ? *((DWORD *)pColors + 2) : 0xff0000;
162 if(dibinfo.dsBitfields[0] != 0xff && dibinfo.dsBitfields[1] != 0xff00 && dibinfo.dsBitfields[2] != 0xff0000) {
163 dprintf(("DIBSection: unsupported bitfields for 32 bits bitmap!!"));
164 }
165 break;
166 }
167 dprintf(("BI_BITFIELDS %x %x %x", dibinfo.dsBitfields[0], dibinfo.dsBitfields[1], dibinfo.dsBitfields[2]));
168 }
169
170 this->handle = handle;
171 this->iUsage = iUsage;
172
173 dibMutex.enter();
174 if(section == NULL)
175 {
176 dprintf(("section was NULL\n"));
177 section = this;
178 }
179 else
180 {
181 DIBSection *dsect = section;
182 dprintf2(("Increment section starting at %08X\n",dsect));
183
184 /* @@@PH 98/07/11 fix for dsect->next == NULL */
185 while ( (dsect->next != this) &&
186 (dsect->next != NULL) )
187 {
188 dprintf2(("Increment section to %08X\n",dsect->next));
189 dsect = dsect->next;
190 }
191 dsect->next = this;
192 }
193 dibMutex.leave();
194}
195//******************************************************************************
196//******************************************************************************
197DIBSection::~DIBSection()
198{
199 dprintf(("Delete DIBSection %x", handle));
200
201 if(hSection) {
202 UnmapViewOfFile(bmpBits);
203 }
204 else
205 if(bmpBits)
206 DosFreeMem(bmpBits);
207
208 if(bmpBitsRGB565)
209 DosFreeMem(bmpBitsRGB565);
210
211 if(pOS2bmp)
212 free(pOS2bmp);
213
214 dibMutex.enter();
215 if(section == this)
216 {
217 section = this->next;
218 }
219 else
220 {
221 DIBSection *dsect = section;
222
223 while(dsect->next != this)
224 {
225 dsect = dsect->next;
226 }
227 dsect->next = this->next;
228 }
229 dibMutex.leave();
230}
231//******************************************************************************
232//******************************************************************************
233int DIBSection::SetDIBits(HDC hdc, HBITMAP hbitmap, UINT startscan, UINT
234 lines, const VOID *bits, BITMAPINFOHEADER_W *pbmi,
235 UINT coloruse)
236{
237 lines = (int)lines >= 0 ? (int)lines : (int)-lines;
238 int palsize=0;
239
240 bmpsize = pbmi->biWidth;
241 os2bmphdrsize = sizeof(BITMAPINFO2);
242
243 switch(pbmi->biBitCount)
244 {
245 case 1:
246 bmpsize = ((bmpsize + 31) & ~31) / 8;
247 palsize = ((1 << pbmi->biBitCount))*sizeof(RGB2);
248 os2bmphdrsize += palsize;
249 break;
250 case 4:
251 bmpsize = ((bmpsize + 7) & ~7) / 2;
252 palsize = ((1 << pbmi->biBitCount))*sizeof(RGB2);
253 os2bmphdrsize += palsize;
254 break;
255 case 8:
256 palsize = ((1 << pbmi->biBitCount))*sizeof(RGB2);
257 os2bmphdrsize += palsize;
258 bmpsize = (bmpsize + 3) & ~3;
259 break;
260 case 16:
261 bmpsize *= 2;
262 bmpsize = (bmpsize + 3) & ~3;
263 break;
264 case 24:
265 bmpsize *= 3;
266 bmpsize = (bmpsize + 3) & ~3;
267 break;
268 case 32:
269 bmpsize *= 4;
270 break;
271 }
272
273 //SvL: TODO: Correct??
274 if(!hSection && pOS2bmp->cx != pbmi->biWidth && pOS2bmp->cy != pbmi->biHeight &&
275 pOS2bmp->cBitCount != pbmi->biBitCount)
276 {
277 char *oldbits = bmpBits;
278 int oldsize = dibinfo.dsBm.bmWidthBytes * dibinfo.dsBm.bmHeight;
279
280 DosAllocMem((PPVOID)&bmpBits, bmpsize*pbmi->biHeight, PAG_READ|PAG_WRITE|PAG_COMMIT);
281 memcpy(bmpBits, oldbits, min(oldsize, bmpsize*pbmi->biHeight));
282 DosFreeMem(oldbits);
283 }
284 pOS2bmp = (BITMAPINFO2 *)realloc(pOS2bmp, os2bmphdrsize);
285 pOS2bmp->cbFix = sizeof(BITMAPINFO2) - sizeof(RGB2);
286 pOS2bmp->cx = pbmi->biWidth;
287 pOS2bmp->cy = pbmi->biHeight;
288 pOS2bmp->cPlanes = pbmi->biPlanes;
289 pOS2bmp->cBitCount = pbmi->biBitCount;
290 pOS2bmp->ulCompression = pbmi->biCompression;
291 pOS2bmp->cbImage = pbmi->biSizeImage;
292
293 // clear DIBSECTION structure
294 memset(&dibinfo, 0, sizeof(dibinfo));
295
296 // copy BITMAPINFOHEADER data into DIBSECTION structure
297 memcpy(&dibinfo.dsBmih, pbmi, sizeof(*pbmi));
298 dibinfo.dsBm.bmType = 0;
299 dibinfo.dsBm.bmWidth = pbmi->biWidth;
300 dibinfo.dsBm.bmHeight = pbmi->biHeight;
301 dibinfo.dsBm.bmWidthBytes= bmpsize;
302 dibinfo.dsBm.bmPlanes = pbmi->biPlanes;
303 dibinfo.dsBm.bmBitsPixel = pbmi->biBitCount;
304 dibinfo.dsBm.bmBits = bmpBits;
305
306 dibinfo.dshSection = hSection;
307 dibinfo.dsOffset = 0; // TODO: put the correct value here (if createdibsection with file handle)
308
309 if(coloruse == DIB_PAL_COLORS || pbmi->biBitCount <= 8)
310 {
311 dibinfo.dsBitfields[0] = dibinfo.dsBitfields[1] = dibinfo.dsBitfields[2] = 0;
312 }
313 else {
314 char *pColors = (char *)pbmi + 1;
315
316 switch(pbmi->biBitCount)
317 {
318 case 16:
319 dibinfo.dsBitfields[0] = (pbmi->biCompression == BI_BITFIELDS) ? *(DWORD *)pColors : 0x7c00;
320 dibinfo.dsBitfields[1] = (pbmi->biCompression == BI_BITFIELDS) ? *((DWORD *)pColors + 1) : 0x03e0;
321 dibinfo.dsBitfields[2] = (pbmi->biCompression == BI_BITFIELDS) ? *((DWORD *)pColors + 2) : 0x001f;
322 break;
323
324 case 24:
325 dibinfo.dsBitfields[0] = 0xff;
326 dibinfo.dsBitfields[1] = 0xff00;
327 dibinfo.dsBitfields[2] = 0xff0000;
328 break;
329
330 case 32:
331 dibinfo.dsBitfields[0] = (pbmi->biCompression == BI_BITFIELDS) ? *(DWORD *)pColors : 0xff;
332 dibinfo.dsBitfields[1] = (pbmi->biCompression == BI_BITFIELDS) ? *((DWORD *)pColors + 1) : 0xff00;
333 dibinfo.dsBitfields[2] = (pbmi->biCompression == BI_BITFIELDS) ? *((DWORD *)pColors + 2) : 0xff0000;
334 if(dibinfo.dsBitfields[0] != 0xff && dibinfo.dsBitfields[1] != 0xff00 && dibinfo.dsBitfields[2] != 0xff0000) {
335 dprintf(("DIBSection: unsupported bitfields for 32 bits bitmap!!"));
336 }
337 break;
338 }
339 dprintf(("BI_BITFIELDS %x %x %x", dibinfo.dsBitfields[0], dibinfo.dsBitfields[1], dibinfo.dsBitfields[2]));
340 }
341
342 dprintf(("DIBSection::SetDIBits (%d,%d), %d %d", pbmi->biWidth, pbmi->biHeight, pbmi->biBitCount, pbmi->biCompression));
343 if(palsize)
344 memcpy(pOS2bmp->argbColor, (char *)pbmi + 1 , palsize);
345
346 if(bits)
347 {
348 int size = bmpsize*lines;
349 memcpy(bmpBits+bmpsize*startscan, bits, size);
350 }
351 return(lines);
352}
353//******************************************************************************
354//******************************************************************************
355int DIBSection::SetDIBColorTable(int startIdx, int cEntries, RGBQUAD *rgb)
356{
357 int i;
358
359 if(startIdx + cEntries > (1 << pOS2bmp->cBitCount))
360 {
361 dprintf(("DIBSection::SetDIBColorTable, invalid nr of entries %d %d\n", startIdx, cEntries));
362 return(0);
363 }
364
365 memcpy(&pOS2bmp->argbColor[startIdx], rgb, cEntries*sizeof(RGB2));
366
367 for(i=startIdx;i<cEntries;i++)
368 {
369 pOS2bmp->argbColor[i].fcOptions = 0;
370 dprintf2(("Index %d : 0x%08X\n",i, *((ULONG*)(&pOS2bmp->argbColor[i])) ));
371 }
372
373 return(cEntries);
374}
375//******************************************************************************
376//******************************************************************************
377BOOL DIBSection::BitBlt(HDC hdcDest, int nXdest, int nYdest, int nDestWidth,
378 int nDestHeight, int nXsrc, int nYsrc,
379 int nSrcWidth, int nSrcHeight, DWORD Rop)
380{
381 HPS hps = (HPS)hdcDest;
382 POINTL point[4];
383 LONG rc;
384 PVOID bitmapBits = NULL;
385 int oldyinversion = 0;
386
387#if 0
388 HWND hwndDest = WindowFromDC(hdcDest);
389 hwndDest = Win32ToOS2Handle(hwndDest);
390 if(hwndDest != 0)
391 {
392 hps = WinGetPS(hwndDest);
393 }
394 if(hps == 0)
395 {
396 dprintf(("ERROR: DIBSection::BitBlt, hps == 0 hwndDest = %X", hwndDest));
397 return(FALSE);
398 }
399#endif
400
401 dprintf(("DIBSection::BitBlt %x %X (hps %x) %x to(%d,%d)(%d,%d) from (%d,%d)(%d,%d) rop %x flip %x",
402// handle, hdcDest, hps, hwndDest, nXdest, nYdest, nDestWidth, nDestHeight,
403 handle, hdcDest, hps, 0, nXdest, nYdest, nDestWidth, nDestHeight,
404 nXsrc, nYsrc, nSrcWidth, nSrcHeight, Rop, fFlip));
405
406 //win32 coordinates are of the left top, OS/2 expects left bottom
407 point[0].x = nXdest;
408 point[0].y = pOS2bmp->cy - nYdest - nDestHeight;
409 point[1].x = nXdest + nDestWidth - 1;
410 point[1].y = pOS2bmp->cy - nYdest - 1;
411 point[2].x = nXsrc;
412 point[2].y = pOS2bmp->cy - nYsrc - nSrcHeight;
413 if(nXsrc + nSrcWidth > pOS2bmp->cx)
414 {
415 point[3].x = pOS2bmp->cx;
416 nSrcWidth = pOS2bmp->cx - nXsrc;
417 }
418 else point[3].x = nXsrc + nSrcWidth;
419
420 if(nYsrc + nSrcHeight > pOS2bmp->cy)
421 {
422 point[3].y = pOS2bmp->cy;
423 nSrcHeight = pOS2bmp->cy - nYsrc;
424 }
425 else point[3].y = pOS2bmp->cy - nYsrc;
426
427 oldyinversion = GpiQueryYInversion(hps);
428 if(fFlip & FLIP_VERT)
429 {
430 GpiEnableYInversion(hps, pOS2bmp->cy-1);
431 }
432 else GpiEnableYInversion(hps, 0);
433
434 if(fFlip & FLIP_HOR)
435 {
436 ULONG x;
437 x = point[0].x;
438 point[0].x = point[1].x;
439 point[1].x = x;
440 }
441
442 //SvL: Optimize this.. (don't convert entire bitmap if only a part will be blitted to the dc)
443 if(dibinfo.dsBitfields[1] == 0x3E0) {//RGB 555?
444 dprintf(("DIBSection::BitBlt; convert rgb 555 to 565"));
445
446 if(bmpBitsRGB565 == NULL)
447 DebugInt3();
448
449 if(CPUFeatures & CPUID_MMX) {
450 RGB555to565MMX((WORD *)bmpBitsRGB565, (WORD *)bmpBits, pOS2bmp->cbImage/sizeof(WORD));
451 }
452 else RGB555to565((WORD *)bmpBitsRGB565, (WORD *)bmpBits, pOS2bmp->cbImage/sizeof(WORD));
453 rc = GpiDrawBits(hps, bmpBitsRGB565, pOS2bmp, 4, &point[0], ROP_SRCCOPY, BBO_OR);
454 }
455 else rc = GpiDrawBits(hps, bmpBits, pOS2bmp, 4, &point[0], ROP_SRCCOPY, BBO_OR);
456
457 if(rc == GPI_OK) {
458 DIBSection *destdib = DIBSection::findHDC(hdcDest);
459 if(destdib) {
460 dprintf(("Sync destination dibsection %x (%x) (%d)", destdib->handle, hdcDest, oldyinversion));
461
462 //todo: rgb 565 to 555 conversion if bpp == 16
463 BITMAPINFO2 *tmphdr = (BITMAPINFO2 *)malloc(destdib->os2bmphdrsize);
464 memcpy(tmphdr, destdib->pOS2bmp, destdib->os2bmphdrsize);
465 rc = GpiQueryBitmapBits(hps, nYdest, nDestHeight, destdib->GetDIBObject(),
466 tmphdr);
467 free(tmphdr);
468 if(rc != nDestHeight) {
469 DebugInt3();
470 }
471 }
472 //restore old y inversion height
473 GpiEnableYInversion(hps, oldyinversion);
474// if(hwndDest != 0)
475// {
476// WinReleasePS(hps);
477// }
478 return(TRUE);
479 }
480 GpiEnableYInversion(hps, oldyinversion);
481// if(hwndDest != 0)
482// {
483// WinReleasePS(hps);
484// }
485 dprintf(("DIBSection::BitBlt %X (%d,%d) (%d,%d) to (%d,%d) (%d,%d) returned %d\n", hps, point[0].x, point[0].y, point[1].x, point[1].y, point[2].x, point[2].y, point[3].x, point[3].y, rc));
486// dprintf(("WinGetLastError returned %X\n", WinGetLastError(WinQueryAnchorBlock(hwndDest)) & 0xFFFF));
487 return(FALSE);
488}
489//******************************************************************************
490//******************************************************************************
491void DIBSection::SelectDIBObject(HDC hdc)
492{
493 this->hdc = hdc;
494 hwndParent = WinWindowFromDC(hdc);
495 dprintf(("SelectDIBObject %x into %x hwndParent = %x", handle, hdc, hwndParent));
496}
497//******************************************************************************
498//******************************************************************************
499DIBSection *DIBSection::find(DWORD handle)
500{
501 DIBSection *dsect = section;
502
503 dibMutex.enter();
504 while(dsect)
505 {
506 if(dsect->handle == handle)
507 {
508 dibMutex.leave();
509 return(dsect);
510 }
511 dsect = dsect->next;
512 }
513 dibMutex.leave();
514 return(NULL);
515}
516//******************************************************************************
517//A bitmap can only be selected into one DC, so this works.
518//******************************************************************************
519DIBSection *DIBSection::findHDC(HDC hdc)
520{
521 DIBSection *dsect = section;
522
523 while(dsect)
524 {
525 if(dsect->hdc == hdc)
526 {
527 return(dsect);
528 }
529 dsect = dsect->next;
530 }
531 return(NULL);
532}
533//******************************************************************************
534//******************************************************************************
535void DIBSection::deleteSection(DWORD handle)
536{
537 DIBSection *dsect = find(handle);
538
539 if(dsect)
540 delete dsect;
541
542}
543//******************************************************************************
544//******************************************************************************
545int DIBSection::GetDIBSection(int iSize, void *lpBuffer)
546{
547 DIBSECTION *pDIBSection = (DIBSECTION *)lpBuffer;
548 LPBITMAP_W dsBm = (LPBITMAP_W)lpBuffer;
549
550 dprintf2(("GetDIBSection %x %d %x", handle, iSize, lpBuffer));
551 if(iSize == sizeof(DIBSECTION))
552 {
553 memcpy(pDIBSection, &dibinfo, sizeof(dibinfo));
554 return sizeof(DIBSECTION);
555 }
556 else
557 if(iSize == sizeof(BITMAP_W))
558 {
559 memcpy(dsBm, &dibinfo.dsBm, sizeof(dibinfo.dsBm));
560 return sizeof(BITMAP_W);
561 }
562 return 0;
563
564}
565//******************************************************************************
566//******************************************************************************
567char DIBSection::GetBitCount()
568{
569 if(pOS2bmp == NULL)
570 return 0;
571 else
572 return pOS2bmp->cBitCount;
573}
574//******************************************************************************
575//******************************************************************************
576DIBSection *DIBSection::section = NULL;
Note: See TracBrowser for help on using the repository browser.