| |
|
|
 | avec GetDiBits et SetDiBits peux on BMP-Bilder im grenier vite manipuler. Grobe Beschreibung : KompilierenMarqueSéparation > wird dans den grenier gelesen KompilierenMarqueSéparation > Bild wird dans un Bereichsvariable emballé KompilierenMarqueSéparation Bild wird manipuliert avec 128 weißen Pixeln (1 Punkt besteht aus 4 Bytes > RGBA). qui 1.Punkt ist unten à gauche ,1. Reihe. qui Reihen attraper toujours à gauche à. Am besten ist, si on cela BMP-Bild 128x128 Pixel pouvoir, ensuite peux on bien voyons, comment qui unteren 10 Reihen aus weißen Pixeln bestehen. KompilierenMarqueSéparation > qui Bereichsvaribale wird wieder sur dem Handle : bild_h& gesetzt KompilierenMarqueSéparation > il peut maintenant cela veränderte Bild im la fenêtre voyons.
avec XPIA/ASM hat on wieder viele möglichkeiten zur Manipulierung ou bien qui den DEV C++ hat et ASM pas mag, une schnelle DLL-Solution herstellen um den Bereich trop verändern.
qui Demo : KompilierenMarqueSéparation $H Windows.ph
declare bild1$
declare hWin&
Fenêtre 20,20-600,450
Cls @RGB(220,220,220)
bild1$=voiture.bmp
erzeugebild(bild1$)
var ende%=1
WHILE ende%
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& = Créer(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
|
|
|
| |
|
|
|
 | super Beitrag et joli erklärt!  |
|
|
| |
|
|
|
 Frank Abbing | So hat iF qui DIBs maintenant enfin aussi verstanden...  |
|
|
| |
|
|
|
 | je wusste qui journée serait venons...  |
|
|
| |
|
|
|
 | |
|
| |
|
|