110,534
社区成员
发帖
与我相关
我的任务
分享
GdipCreateBitmapFromScan0 ImgWizard.Width, ImgWizard.Height, ImgWizard.Stride, PixelFormat, BYVAL ImgWizard.Pointer, GdipSrcImg
GdipCreateBitmapFromScan0 NewImgWizard.Width, NewImgWizard.Height, NewImgWizard.Stride, PixelFormat, BYVAL NewImgWizard.Pointer, GdiDestImg
IF ImgWizard.BitCount<=8 THEN
GdiPalette.Flags=%PaletteFlags.PaletteFlagsHasAlpha
GdiPalette.Count=ImgWizard.PaletteSize
CopyMemory GdiPalette.Entries(0),BYVAL ImgWizard.PaletteAddress,ImgWizard.PaletteSize*4
GdipSetImagePalette GdipSrcImg, GdiPalette
GdipSetImagePalette GdiDestImg, GdiPalette
END IF
GdipGetImageGraphicsContext GdiDestImg,Graphics
GdipDrawImageRectRectI Graphics,GdipSrcImg,0,0,NewImgWizard.Width,NewImgWizard.Height,0,0,ImgWizard.Width,ImgWizard.Height,2, 0, 0, 0
GdipDeleteGraphics Graphics
GdipDisposeImage GdipSrcImg
GdipDisposeImage GdiDestImg