Set proper flags and masks in BuildDIBPalette. Set PAL_BGR for 24/32 BPP in AllocPalette. Rename Mode to Flags to better reflect its usage. Fixes "red icons" and dibtest.
svn path=/branches/reactos-yarotows/; revision=49265
- Remove a wrong ASSERT
- Improve EngLoadImageEx to correctly handle the path and optional dll extension.
- Get rid of EngLoadDriver
svn path=/branches/reactos-yarotows/; revision=49245
- Use newly introduced macros and get rid of related functions
- Ignore alpha channels of solid brush color
svn path=/branches/reactos-yarotows/; revision=48680
- Create the visible region upon DC initilization propely.
This is a leftover from 48579 and 48660.
svn path=/branches/reactos-yarotows/; revision=48665
- I watch and I learn : / has precedence over *=.
- Also make sure that we divide what we want to divide with the appropriate parentheses.
- Do not take care of alpha in other depths than 32 bpp.
svn path=/branches/reactos-yarotows/; revision=48488
Fix a bug when premultiplying the color values: The / operator has a higher precedence than *=, so "x *= byte / 0xff", is always 0 unless byte == 0xff.
svn path=/branches/reactos-yarotows/; revision=48485
- work directly with bitmap bits when alpha blending icons. This is permitted, those are API bitmaps.
- Do not create a stretched copy of source surface in EngAlphaBlend, handle stretching in DIB functions.
- Do so.
- Simplify DIB alpha blending for 24 and 32 bpp, implement generic alpha blend support for other depth.
svn path=/branches/reactos-yarotows/; revision=48483
- Did you know that we should ignore alpha channel of pattern in ROPs? You didn't, I didn't, now we do.
[WIN32K]
- Use BGR palette as default for 24 and 32 bpp bitmaps.
svn path=/branches/reactos-yarotows/; revision=48470
- Do not cast RGBQUAD to PALETTEENTRY or the other way around, you idiot.
- Report success even when we're asked fo 0 ScanLines in NtGdiGetDIBitsInternal.
svn path=/branches/reactos-yarotows/; revision=48417
- NtGdiGetBitmapBits : Bits we're given are 16 bits aligned.
- NtGdiGetDIBitsInternal : we must not stretch, for this there is NtGdiStretchDIBitsInternal. Use lower level functions to do the work, there is no need to create HDCs etc...
Now icons are back.
svn path=/branches/reactos-yarotows/; revision=48416
- Use correct offset in UserLoadImage, create the bitmap using display DC.
- BITMAP_GetObject : Report BI_BITFIELDS compression when we should.
- Use a 0 compatible DC when none is given in NtGdiCreateDIBitmapInternal.
This fixes some wine tests. Enjoy.
svn path=/branches/reactos-yarotows/; revision=48415
- Apply a better fix for correctly report 16 bits alignment for DDBs, and keep them 32 bits aligned as it should be.
- Reapply Pigglesworth patch, which was correct since mine was not.
Dedicated to tkreuzer, PigglesWorth and lassy, the three guys still on IRC to watch my commits at 3:30 AM.
svn path=/branches/reactos-yarotows/; revision=48408
- DDB are 16 bits aligned.
- Reset hdc field of the unselected bitmap.
- Lock it too, so it's not messed with when we unselect it.
- Move Pattern creation of IntGdiCreateDIBBrush to DIB_CreateDIBSection.
svn path=/branches/reactos-yarotows/; revision=48406
- Revert unwanted change and get back to PAL_BGR for default DIB palette mode.
Now yarotows looks like an OS again.
svn path=/branches/reactos-yarotows/; revision=48390
- Finally get rid of ProbeAndConvertToBitmapV5Info
- Rewrite renderBITMAPfromDIB, and a good bunch of DIB related functions accordingly.
- Rewrite BITMAP_CopyBitmap into something simpler.
- Use already existing DIB functions in IntGdiCreateDIBBrush
- Use DIB sections in NtGdiStretchDIBitsInternal and NtGdiSetDIBits.
- Use Bitmap hdc for NtGdiGetDIBitsInternal if there is one.
svn path=/branches/reactos-yarotows/; revision=48389
- Cast Colors to RGBQUAD in EngCreateBitmap, since that's what they are.
- Copy selected palette of the DC when creating a DIBSection with DIB_PAL_COLORS.
- Do not try to get Colors in NtGdiGetDIBitsInternal when bpp == 0, this doesn't make any sense.
- Get rid of SURFACE::dsBitfields and SURFACE::biClrUsed.
- Use RGB as default palette mod when creating the DIB Palette.
svn path=/branches/reactos-yarotows/; revision=48369
- rewrite UserLoadImage so that it uses information from the BITMAPFILEHEADER and probes the right buffer.
svn path=/branches/reactos-yarotows/; revision=48364
- Rewrite NtGdiGetDIBitsInternal, with WINE as a reference.
- Get back DIB Section creation to classic BITMAPINFO.
This si the beginnig of the end for all this BITMAPV5INFO stuff.
It is horrible, BITMAPCOREINFO->BITMAPINFO is already made in user mode, and V4 and V5 features are not used so often.
svn path=/branches/reactos-yarotows/; revision=48359
- More BITMAPINFO->BITMAPV5INFO
- Do not use PAL_BITFIELDS when creating the DIB palette and we know that it's RGB
- PSEH-ize NtGdiCreateDIBSection
svn path=/branches/reactos-yarotows/; revision=48248