| |
|
|
 | with GetDiBits and SetDiBits can BMP-Images memory quick manipulating. crude Description : CompileMarkSeparation > becomes into memory red CompileMarkSeparation > Image in a Memory-Variable gepackt CompileMarkSeparation Image manipulating with 128 weißen Pixeln (1 point exists from 4 Bytes > RGBA). The 1.point is under left ,1. row. The Reihen catch always left on. best is, if to the BMP-Image 128x128 Pixel power, then can well see, as downstairs 10 Reihen from weißen Pixeln consist. CompileMarkSeparation > The Bereichsvaribale becomes again on the lever : bild_h& staid CompileMarkSeparation > one can now the changed Image in the Window see.
with XPIA/ASM has one again many possibilities to Manipulierung or who whom DEV C++ has and ASM not likes, a speedy DLL-Solution produce around the area To change.
The demonstration : CompileMarkSeparation $H windows.ph
declare presentment1$
declare hWin&
Window 20,20-600,450
Cls @RGB(220,220,220)
bild1$=car.bmp
erzeugebild(presentment1$)
var end%=1
WHILE end%
sleep 1
waitkey
ENDWHILE
proc erzeugebild
parameters namebild$
declare width%,height%
declare bild_h&,a&
declare bmi#,bildxy#
mcls 0,0,0
startpaint -1
mloadbmp namebild$,0,0
endpaint
height%=%bmpy
width%=%bmpx
def &BI_RGB 0
def &DIB_RGB_COLORS 0
struct BITMAPINFOHEADER =
biSize&, biWidth&, biHeight&, biPlanes%, biBitCount%, biCompression&,
biSizeImage&, biXPelsPerMeter&, biYPelsPerMeter&, biClrUsed&, biClrImportant&
dim bmi#,BITMAPINFOHEADER
clear bmi#
with bmi#
.biSize& = sizeof(bmi#)
.biWidth& = width%
.biHeight& = height%
.biPlanes% = 1
.biBitCount% = 32
.biCompression& = &BI_RGB
.biSizeImage& = ((.biWidth& * .biBitCount% 8 - 1) | 3 + 1) * abs(.biHeight&)
endwith
bild_h& = Create(hPic, -1, namebild$)
drawpic bild_h&,10,10,0
a&=bmi#.biSizeImage&
dim bildxy#,a&
~GetDIBits(%hdc,bild_h&,0,bmi#.biHeight&,bildxy#,bmi#,0)
whileloop 128*4*10
byte bildxy#,&loop=255
endwhile
~setDIBits(%hdc,bild_h&,0,bmi#.biHeight&,bildxy#,bmi#,0)
drawpic bild_h&,10,150,0
dispose bmi#
dispose bildxy#
endproc
|
|
|
| |
|
|
|
 | class Posting and beautiful declared!  |
|
|
| |
|
|
|
 Frank Abbing | so has iF The DIBs now finally too understood...  |
|
|
| |
|
|
|
 | I known the day would come...  |
|
|
| |
|
|
|
 | |
|
| |
|
|