English
Forum

Graphics question of the day ...

 
want of ScreenHandle "hWin& = @Create("text", %hWnd, "Test1", 10, 10, 400,400)" one neckline ex x=200, y=200 with the Breite=128 and Höhe=128 schnellstmöglich in a with "Create" erstellten Bildhandle& copy to Auswertung.

mfg
peter
 
08/25/08  
 




Rolf
Koch
??? Hello Peter, The question have You but already here set: [...] 
and what iF there with the Signatur meant: [...] 
 
08/25/08  
 




Jörg
Sellmeyer
well, with the the Signatur has it now Yes. has you because iFs response not weitergeholfen? I Have not yet integrally understood, what You want. here time schematisch
CompileMarkSeparation
Cls
Var txt& = Create("Text",%hwnd,"Test",10,10,400,400)
MCLS 128,128
MCopyBmp (10 + 200), (10 + 200) - 0,0,0
Var hBmp& = Create("hPic",0,"&MEMBMP")/pre>



"&MEMBMP" - it'll a Bitmapkopie with the actually with MCLS or MLOADBMP begot Memory bitmap prepares.


is now though not tested, separate only so zusammengeschrieben.
helps you the first moreover?
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/26/08  
 



Jup, thanks Jörg.

one must not so far think.

The Bildschirmausschnitt the beginnend with X1,Y1 a wide of X2 Pixel and a Höhe of Y2 Pixel has, becomes from the with MLoadBmp geladenem Image on The position X3,Y3 copies.


here I had me festgebissen in the Description "...on The position X3,Y3 copies.....", thats copy only on the visible Window copiert and is not inem lever reingepackt go can.

Moin Rolf, I greet you.

mfg
peter
 
08/26/08  
 



never forsaking Peter ! was one schweres undertaking.

now works it, a beliebigen Bildauschnitt 128X128 Pixel in the ongoing Programmablauf of Window on the left Page with BitBlt in a DIB To bring and then The Memory-Variable read(becomes not implemented the Reading).
in the While-loop becomes as example with BitBlt into DC-idc& the iBitmap&, the Grafikbereich read, (without conversion in a DC goes not).
with GetDiBits becomes The iBitmap&(now not The DC) into Memory-Variable red.
and with SetDIBitsToDevice can too directly The Memory-Variable of XProfan the Window bring as Image, without this umzuwandeln. becomes on the rechten Page displayed.
The speed for 3 Commands in the Loop for a Passage concise 4ms and the first 2 command, The I only need, without Bilddarstellung are it 1ms

has a grossen Lerneffekt had with the API-command.

mfg
peter
CompileMarkSeparation
 $H Windows.ph
Window 20,20-800,600
Cls @RGB(220,220,220)
var hWin& = @Create("text", %hWnd, "Test0", 10, 10, 600,400)
declare bmi#
declare bild#
dim bild#,128*128*4
var width%=128
var height%=128
bitmap_header()
startpaint hWin&
loadbmp "tile1.bmp",0,0,0
endpaint
var hdc&=~GetDC(hWin&)
var iDC&=~CreateCompatibleDC(hDC&)
var iBitmap& = ~CreateDIBSection(idc&, bmi#, ~DIB_RGB_COLORS, 0,0,0)
~SelectObject(iDC&, iBitmap&)

whileloop 0,120,1

    ~Bitblt(idc&,0,0,128,128,hdc&,0+&loop,0+&loop,~SRCCOPY)
    ~GetDIBits(hdc&,iBitmap&,0,128,bild#,bmi#,~DIB_RGB_COLORS)
    ~SetDIBitsToDevice(hdc&, 350, 0, width%, height%, 0, 0, 0, 128, bild#,bmi#, ~DIB_RGB_COLORS)
    sleep 1

endwhile

waitkey
end

proc bitmap_header

    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

endproc


4 kB
Hochgeladen:08/27/08
Downloadcounter60
Download
 
08/27/08  
 



therefore too with XProfan11 (to that Happiness) explicit vereinfacht there one arbitrary hPics relating can.
 
08/27/08  
 



These 3 command supplant quasi whom of you erwähnten :
CompileMarkSeparation
var hdc&=~GetDC(hWin&)
va r iDC&=~CreateCompatibleDC(h DC&)
var iBitmap& = ~CreateDIBSection(idc&, bmi#, ~DIB_RGB_COLORS, 0,0,0)re>

for the GetDibits and SetDIBitsToDevice find I no faster Solution as XProfanbefehl.

On GEHTS...., to that next success. not tired go.
have already plenty learnt.

mfg
peter
 
08/27/08  
 



If this commands of XProfan11 :
bitmap handle & = create("hPicCopy", hPic&[, x%, y%, dx%, dy%])
too a direct copy of ablaufenden Window can make, then is it one schöner progress or one then too several MCLS lay out can to that speedy zwischenspeichern.

mfg
peter
 
08/27/08  
 



therefore goes indeed something like: [...] 
 
08/27/08  
 



Sometime if Roland from the leave is, wished it my proposition on XProfan11 Edit.
Runs already.

mfg
peter
 
08/28/08  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.088 Views

Untitledvor 0 min.

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie