Convert a .jpg or .png whatever to a BW ZX image?

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Spinnetti
Posts: 253
Joined: Sat Sep 12, 2020 11:29 pm

Convert a .jpg or .png whatever to a BW ZX image?

Post by Spinnetti »

Hi,

I'm looking to create splash screen for a game me and a buddy did, and our art skills aren't great. Is there any sort of utility that will take a picture and turn it into a BW ZX compatible screen that we can grab the hex codes for?

Thanks!
Zeddy: ZX80, ZX81/ZXpand, TS1000/ZXpand, TS1500/Zxpand+
Speccy: 48k, +, +2, +3, TS2068, "Bare Metal" Pi, Next KS2, IF1/Microdrives/Vdrive/Light Gun/VGA-Joy
QL: Minerva/QL-VGA/Custom PSU
C5: 24v, LiFE battery, Disc brakes
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Convert a .jpg or .png whatever to a BW ZX image?

Post by XavSnap »

Hi,

For a Spectrum or a Zx81 ?
For Windows or something else ?


Zx81:
Vb81 XuR > Tools > D_Files tools > digitalize a bitmap picture.

Image
Can export it in BAS (basic text file 24x32) or text file (TXT)… but, throw the screen directly to the Zx's D_file (save it in binary to recall it).
From jpg, gif ou bmp format.

Right/left click to select the lower and the higher color, in the the left picture

Vb81 XuR > Tools > Easy Draw to change the D_file contant.
Image

Spectrum:
This tread: https://forum.system-cfg.com/viewtopic. ... p+spectrum
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
GCHarder
Posts: 427
Joined: Sat Dec 14, 2013 7:46 pm

Re: Convert a .jpg or .png whatever to a BW ZX image?

Post by GCHarder »

It would be nice if there was an option to Save as scr format on the digitize window. Would make it possible to LOAD and SAVE several images without having to leave the window to SAVE the LOADed image.

Just a suggestion, not a big deal.

Regards;

Greg
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Convert a .jpg or .png whatever to a BW ZX image?

Post by XavSnap »

:shock:

Yes !
I had to have a look to this window…

Thanks Greg, my favorite user.

[Edit: download updated, menu moved to the main "Tools" menu, and binary D_File save added.]
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Spinnetti
Posts: 253
Joined: Sat Sep 12, 2020 11:29 pm

Re: Convert a .jpg or .png whatever to a BW ZX image?

Post by Spinnetti »

Thanks, that helps..

Ultimately, I just want the hex codes that I can use to map onto the screen from assembly as an opening screen for a game we did for the zx-81. Just finishing up what we started 37 years ago, then will move on to some Spectrum Next programming :)
Zeddy: ZX80, ZX81/ZXpand, TS1000/ZXpand, TS1500/Zxpand+
Speccy: 48k, +, +2, +3, TS2068, "Bare Metal" Pi, Next KS2, IF1/Microdrives/Vdrive/Light Gun/VGA-Joy
QL: Minerva/QL-VGA/Custom PSU
C5: 24v, LiFE battery, Disc brakes
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Convert a .jpg or .png whatever to a BW ZX image?

Post by XavSnap »

to retrieve a binary bloc to a text file...
Or save this bloc in a binary file, and recall it to a rem.

In cas of a screen filling at the start, you had to save the D_File screen in P,BIN ou SCR and patch the selected file in "file explorer".
P_D_File.JPG
The file had to be saved in 16k and deflated mode, and add a waiting process to display the screen before a CLS.
Last edited by XavSnap on Wed Mar 23, 2022 6:46 pm, edited 1 time in total.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Spinnetti
Posts: 253
Joined: Sat Sep 12, 2020 11:29 pm

Re: Convert a .jpg or .png whatever to a BW ZX image?

Post by Spinnetti »

Missed that reply way back.. Thanks!
Zeddy: ZX80, ZX81/ZXpand, TS1000/ZXpand, TS1500/Zxpand+
Speccy: 48k, +, +2, +3, TS2068, "Bare Metal" Pi, Next KS2, IF1/Microdrives/Vdrive/Light Gun/VGA-Joy
QL: Minerva/QL-VGA/Custom PSU
C5: 24v, LiFE battery, Disc brakes
User avatar
stefano
Posts: 542
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: Convert a .jpg or .png whatever to a BW ZX image?

Post by stefano »

You could use z88dk.
It provides a "monochrome sprite" editor, which uses the Allegro library and can be built everywhere.
Use the editor to import a picture, then use putsprite() to get it onto the screen.
retrofan8081
Posts: 17
Joined: Thu Aug 06, 2020 11:29 am

Re: Convert a .jpg or .png whatever to a BW ZX image?

Post by retrofan8081 »

I use 'gimp' photo editor.

load image, convert to greyscale, scale to 256x192, then convert to 1-bit palette using floyd-streinberg dithering. Some images work better than some others. export the final image as 'PBM/binary' this is a packed 8 bit format with a little text header. remove the header with a hex editor and the resulting file is a wrx screen image!
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Convert a .jpg or .png whatever to a BW ZX image?

Post by XavSnap »

Memotech HRG:
bmp1.jpg
QuickSilva HRG:
bmp2.jpg
Note:
The Windows BMP 1bit format can't be use as is.
This format create a cluster of lines how merge binary datas to the wrong offset.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Post Reply