Get , Put
#2
Well this sorta like what I think you want. Use _PutImage for both Get and Put
Think of _PutImage as copying an Image from one container to another. The screen is one kind of Container, another is made with _NewImage and another is a handle made from LoadImage. Maybe I should say, think of _PutImage as copying from one container handle to another. Main display screen has a handle = 0.

Code: (Select All)
Const Xpix = 1290 ' you guys with the giant screen give me a break
Const Ypix = 700
Screen _NewImage(Xpix, Ypix, 32)
_FullScreen

Dim As Long Pismeno(5)
Pismo& = _LoadFont("Arial.ttf", 100, "monospace") ' don't have that other font 300 = 300 pixel high font
_Font Pismo&

Cx = 450: CY = 110
x = 100: y = 100
'For t = 1 To 5    ' one image first baby steps
Pismeno(1) = _NewImage(_PrintWidth("Hello World"), 100, 32)
Locate 1, 1: Print "Hello World"

Line (0, 0)-(_PrintWidth("Hello World"), 100), , B

'Get (Cx - x, CY - y)-(Cx + x, CY + y), Pismeno(t)  - I keep getting this error

_PutImage , 0, Pismeno(1), (0, 0)-(_PrintWidth("Hello World"), 100)
Sleep 'check her out
Cls


'Next t
For t = 1 To 7
    '_Source Pismeno(t)
    '_Dest 0
    _PutImage ((_Width - _PrintWidth("Hello World")) / 2, (t - 1) * 100), Pismeno(1), 0
    'c = c + 200
Next t
_Display
Sleep

Don't forget to hit a key after you see first image of Print on Screen, that is image we are going to Get.
After key press we PUT the Image 7 times down middle of screen.

This is key:
_PrintWidth("Hello World")) ' tells me exactly how wide the box will be to fit the text, then we make _Newimage that size

Study _Putimage you can get and put both with it. Oh check out Keyword for day on _PUTIMAGE ;-)) I hear it's excellent LOL!
https://staging.qb64phoenix.com/showthread.php?tid=1119

Saving images to file is a completely different thing and I recomment SMcNeill's SaveImage routines/library.
Quote:I don't want to record them from a file..
Well then, never mind Smile

PS: Welcome to the forum! Smile
b = b + ...
Reply


Messages In This Thread
Get , Put - by CSslymer - 01-28-2023, 06:23 PM
RE: Get , Put - by bplus - 01-28-2023, 06:54 PM
RE: Get , Put - by CSslymer - 01-28-2023, 11:47 PM
RE: Get , Put - by CSslymer - 01-28-2023, 11:49 PM
RE: Get , Put - by bplus - 01-29-2023, 01:43 AM
RE: Get , Put - by bplus - 01-29-2023, 05:16 PM



Users browsing this thread: 1 Guest(s)