English
Forum

Bildspeicherverbrauch in the While-Loop....

 

funkheld
this bild& in the While-Schleife;
bild&=create("Hpiccopy",screen&,200,200,50,50)
becomes Yes over ands over again new created.
becomes there over ands over again new memory uses, or becomes the image always in the same Speicherbereich laid, so the the vorgehende not rausgenommen go need?

Thank you.

greeting
 {$cleq}
 {$compiler d:\XProfan11\}
 {$runtime d:\XProfan11\}
declare screen&,bild&,ende&
ende&=1
Window 20,20-500,500
Cls RGB(220,220,220)
screen& = create("hNewPic", 400,400,rgb(255,255,0))
startpaint screen&
usebrush 1,rgb(0,128,255)
ellipsis 200,200-250,250
endpaint

Whileloop 10000

    drawpic screen&,20,20;0
    bild&=create("Hpiccopy",screen&,200,200,50,50)
    startpaint screen&
    drawpic bild&,100,10;0
    endpaint

EndWhile

End
 
04/13/12  
 




Jörg
Sellmeyer
Profan-Help Create (hPic...)
to the terminate the Program must the lever with DeleteObject again released go, there otherwise the from the Bitmap belegte Speicherplatz not again on the system zurückgegeben becomes.


In Your drop becomes The Loop Yes only once go through, there can't so plenty occur. You can but with DeleteObject the lever over ands over again delete. If you objectively many Handles bneötigst, save You tappt im dunkeln on the best in a aray.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
04/13/12  
 




funkheld
have now a Whileloop with 10000
it comes to that Crash.

How can I now something of Screen into Variable bild& settle without dauernd this DeleteObject bild& To benefit .

gives it no commands moreover?

Thank you.
greeting
 
04/13/12  
 



DeleteObject is the übliche lane.
 
04/13/12  
 




Jörg
Sellmeyer
what have You against DeleteObject?
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
04/13/12  
 




funkheld
Jup, thanks.
I have under one area arranged with : mcls 50,50
therein have I one part the Screen copies : copybmptomem 200,200-50,50>0,0

How do I get the BIld now on a defined place of Screen&?
How do I get on The address the mcls-Speichers around the data To manipulating ?

Thank you.

greeting
 {$cleq}
 {$compiler d:\XProfan11\}
 {$runtime d:\XProfan11\}
declare screen&,bild&,ende&
ende&=1
Window 20,20-500,500
Cls RGB(220,220,220)
screen& = create("hNewPic", 400,400,rgb(255,255,0))
bild&=create("hnewpic",60,60,rgb(0,0,0))
mcls 50,50
startpaint screen&
usebrush 1,rgb(0,128,255)
ellipsis 200,200-250,250
endpaint

While ende&

    drawpic screen&,20,20;0
    copybmptomem 200,200-50,50>0,0
    .........

EndWhile

waitkey
End
 
04/13/12  
 




Jörg
Sellmeyer
You can also with StartPaint -1 directly on The Memorybitmep draw or You beget with @Create("HPIC",n,s) and the Parameter "&MEMBMP" a copy
Profanhilfe To Create (hPic,...)
... the actually with MCLS or MLOADBMP begot Memory bitmap....
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
04/13/12  
 



gives indeed MCopyBmp X1,Y1 - X2,Y2 > X3,Y3; n1[, n2] what to StartPaint on Screen utilize can.
 
04/13/12  
 




therein have I one part the Screen copies


And if the Screen (teils, z.B. of Windows) covers becomes?
 
04/13/12  
 




funkheld
MCopyBmp goes only MLoadBmp Images:


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.


meets by me but not To, i want a copy without always this "Create"...

Thank you.

greeting
 
04/13/12  
 



@Funkheld:
What exactly have Thou to?

I can namely present the it a einfachere/ faster Herangehensweise gives.

If you something like How "Sprites" release want then recommend I the image in the
memory zusammenzusetzen and once per Frame the Zielausgabefenster
To copy.

Virtually of term since:
 
04/13/12  
 




funkheld

what have You against DeleteObject?


If I something ongoing Save would like to that evaluate, Why must one there always a new Speicherbereich create and unlock.

gives it nothing the one only with the one reserved Speicherbereich for a designed object operates with the graphic?

Thank you.

If: kanndst You such a thing time again as Nativen code for XPSE develop ?

Thank you.

greeting
 
04/13/12  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

10.481 Views

Untitledvor 0 min.
Jörg Sellmeyer05/15/18
Uwe Lang01/17/17
mein06/02/13
Heiko Dix11/10/12
More...

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