How take Loading and Running Screens?
Moderator: druellan
How take Loading and Running Screens?
Hi guys!
How can I take the loading and running screens from ZXDB?
For example in the API I have the data:
"filename": "0030985-run-1.png",
"size": 8274,
"format": "Picture",
"type": "Running screen",
"title": "",
"url": "/zxscreens/0030985/0030985-run-1.png"
But from where can I load this image?
I didn´t find this info in the Github.
Thank you!
How can I take the loading and running screens from ZXDB?
For example in the API I have the data:
"filename": "0030985-run-1.png",
"size": 8274,
"format": "Picture",
"type": "Running screen",
"title": "",
"url": "/zxscreens/0030985/0030985-run-1.png"
But from where can I load this image?
I didn´t find this info in the Github.
Thank you!
Creator of ZX App: https://play.google.com/store/apps/deta ... boys.zxapp
Re: How take Loading and Running Screens?
These are from the "screens" section which are API specific. You need to look into the additional section:
"additionals": [
{
"url": "/zxdb/sinclair/entries/0030985/0030985-load-1.scr",
"type": "Loading screen",
"format": "Screen dump"
},
{
"url": "/zxdb/sinclair/entries/0030985/0030985-run-1.scr",
"type": "Running screen",
"format": "Screen dump"
}
],
And then follow the "Additional" guide on github
https://github.com/zxdb/ZXDB
/Thomas
"additionals": [
{
"url": "/zxdb/sinclair/entries/0030985/0030985-load-1.scr",
"type": "Loading screen",
"format": "Screen dump"
},
{
"url": "/zxdb/sinclair/entries/0030985/0030985-run-1.scr",
"type": "Running screen",
"format": "Screen dump"
}
],
And then follow the "Additional" guide on github
https://github.com/zxdb/ZXDB
/Thomas
https://api.zxinfo.dk/v3/ - ZXDB API for developers
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
Re: How take Loading and Running Screens?
Thank you!
Creator of ZX App: https://play.google.com/store/apps/deta ... boys.zxapp
Re: How take Loading and Running Screens?
Would appreciate some more clarifications on the same subject. Is there no point to the URLs with /zxscreens/ path in the Screen section of games API?
Do we have to get the .SCR file and then convert to PNG as required?
Do we have to get the .SCR file and then convert to PNG as required?
Re: How take Loading and Running Screens?
Check ZX-Image:
PHP-based ZX Spectrum images parsing into PNG/GIF. Supports animation, supports file caching.
https://github.com/moroz1999/zx-image
PHP-based ZX Spectrum images parsing into PNG/GIF. Supports animation, supports file caching.
https://github.com/moroz1999/zx-image
Re: How take Loading and Running Screens?
Aren't some of them already .png files? Is there a mix?
e.g.
Code: Select all
url: "/zxscreens/0004665/SpaceHarrierII-load.png"
My Speccy site: thirdharmoniser.com
Re: How take Loading and Running Screens?
Thanks, but I'm using Windows Forms, so PHP isn't an option.4thRock wrote: ↑Wed Mar 30, 2022 2:05 pm Check ZX-Image:
PHP-based ZX Spectrum images parsing into PNG/GIF. Supports animation, supports file caching.
https://github.com/moroz1999/zx-image
Re: How take Loading and Running Screens?
That's exactly the confusion. The URL seems to suggest there is a PNG version of the file, but it doesn't say *where* to get it from. the "/zxscreens/" is a local path, but where is it hosted? That was my original question.Morkin wrote: ↑Wed Mar 30, 2022 4:10 pm Aren't some of them already .png files? Is there a mix?Code: Select all
url: "/zxscreens/0004665/SpaceHarrierII-load.png"
If only the SCR is actually available I was wondering if there is the possibility of providing a PNG alternative as well. After all, the rest of the screenshots are PNG so there is no reason to retain just the SCR version of this file.
EDIT:
It turns out that these paths can be resolved by prefixing "https://zxinfo.dk/media" to the URL. This website belongs to @kolbeck if I'm not wrong. While it works if I do this, I'm not sure if this is intentional and whether kolbeck intends the URLs to be used this way. If it isn't please let me know so that I can try different approach.
Re: How take Loading and Running Screens?
You need to handle image display on your end, as ZXDB will only provide relative paths and in most cases native formats.
Each ZXDB site/app handles paths and image conversions differently, with custom solutions as needed.
Linking to existing sites is not a good practice, because of increased traffic triggering server hotlink protection, and probable cross-domain loading problems.
Each ZXDB site/app handles paths and image conversions differently, with custom solutions as needed.
Linking to existing sites is not a good practice, because of increased traffic triggering server hotlink protection, and probable cross-domain loading problems.
Re: How take Loading and Running Screens?
The API notes say it's OK (we're all good Spec-citizens, right? )arjun wrote: ↑Thu Mar 31, 2022 5:52 am It turns out that these paths can be resolved by prefixing "https://zxinfo.dk/media" to the URL. This website belongs to @kolbeck if I'm not wrong. While it works if I do this, I'm not sure if this is intentional and whether kolbeck intends the URLs to be used this way. If it isn't please let me know so that I can try different approach.
I did this for any running screens sourced at /zxdb/sinclair/:
Code: Select all
imageDisplay.setAttribute('src', "https://zxinfo.dk/media" + imageUrl);
My Speccy site: thirdharmoniser.com
Re: How take Loading and Running Screens?
Cheers Morkin! Good to know I'm not doing something blatantly suspicious!Morkin wrote: ↑Thu Mar 31, 2022 9:12 am
The API notes say it's OK (we're all good Spec-citizens, right? )
I did this for any running screens sourced at /zxdb/sinclair/:
Code: Select all
imageDisplay.setAttribute('src', "https://zxinfo.dk/media" + imageUrl);
Re: How take Loading and Running Screens?
ZXInfo converts SCR to gif or png to help if clients do prefer not to handle it on the run, for example mobile apps. So yes, its perfectly fine to use Them - i might even consider updating the API doc
https://api.zxinfo.dk/v3/ - ZXDB API for developers
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend
zxinfo-file-browser - Cross platform app to manage your files
https://zxinfo.dk - another ZXDB frontend