|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Sujet n° 1496 |
saving the screen to a file? |
le 09/12/2006 @ 22:41 par Dave O\'Brien
|
Is there a way to save a screen (whole or part) to a file?
(As far as I can tell, the existing SAVESCREEN command is meant only for use with the RESTORESCREEN command.)
Any tips appreciated. Thanks. |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 1 -------- le 10/12/2006 @ 00:23 par aldweb
visiteur |
Hello Dave,
Yes there is a way (anyway, there is always a way ).
The PGET(X,Y) function will let you retrieve the pixel color at the (X,Y) position. Just, save the returned values by PGET for a range of (X,Y), (1,1) to (160,160) for retrieving the whole screen. Then, to draw back the whole or part of the screen will just be a question of reading the file and applying the PSET statement.
Then, the point is to know how you want to save this information in a file. Indeed, the way of doing I provided above will build a heavy file. You might want to use some image routines to save the information, and there we get to the point of finding algorithms for saving & reading JPEG, GIF, PNG types of images... You could also save a bitmap resource, then using the Resource PP applet. There are indeed many possibilities
Cheers, aldweb
@+ aldweb |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 2 -------- le 19/12/2006 @ 08:11 par Khertan
visiteur |
Maybe doing this with an applet will be more efficiently. |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 3 -------- le 22/12/2006 @ 11:08 par aldweb
visiteur |
Hello Khertan,
Sure, you are right. But if performance is OK, why bother switching to PP? And I know that Dave rather goes for 100% native iziBasic code...
Cheers, aldweb
@+ aldweb |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 4 -------- le 23/12/2006 @ 03:33 par Dave O\'Brien
visiteur |
Actually, what prompted my question was a request from a Kaleida user to be able to save her doodles to a picture file that she could use as wallpaper.
I imagine that would be in some standard format like JPEG, GIF, PNG, etc. And that's deeper voodoo that I'd want to tackle on my own. ;^) |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 5 -------- le 24/12/2006 @ 06:52 par Lou
visiteur |
Hi Dave,
I'd recommend to your user she check out Snap, which snaps a screen shot in bmp format onto a card.
BTW, I downloaded the newer version of Kaleida. Looks like you widened the heavy line. For what it's worth, I like the original. Either way, cool little app.
Lou |
|
|
sujet actif
sujet clos
Important!
Nouveau message -
Rectifier message
Clôturer sujet
Remonter
|
|