Page 1 of 1

jpg and png formats

Posted: Sun Nov 14, 2021 9:17 pm
by cborn
Hello, i did a search about jpg format but i only find pictures with that extention.
is there any PNG or JPG format avialable?
if not, what possibilities are there ?
i tried BMP in basic and , indeed, thats a burdon already.
PNG can easily be 8bits. jpg , i just dont know

Re: jpg and png formats

Posted: Tue Nov 16, 2021 8:57 pm
by dom
To be blunt, in my opinion viewing jpg/png files directly on a Spectrum is pointless given the CPU, pixel and colour resolution limitation and limited memory. For a ZX Next I could see it being feasible - In fact I think I remember seeing one at some point?

For a regular ZX, using a much more powerful computer to transcode to an appropriate format seems a more sensible approach, be it using something similar to this: https://github.com/the-channels/channels or just a batch uncompress, decode, reformat, compress with ZX*

Re: jpg and png formats

Posted: Wed Nov 17, 2021 3:21 am
by cborn
Actualy i have some small PNG which i was converting to zx-bmp style, al in basic.
I have done halve of the oric "space:1999" pictures and got stuck on the png.
so if z88dk had some native READERS i would be a happy coder.
and thode file or not necesary big. and probably both jpg and png come with different versions, over the years.
finaly, for my gigascreen simulator it would be nice to have a reader aswel.
i dont mind its slow
did you ever wait a FULL 128 game on real speed, on a real zx spectrum? thats more then 10 minutes waiting, just waiting.
i understand the overlaying problem called size and limits, but a 20kb png will probably fit in most z80 holding targets.
maybe only a small window within has to 'unfold' if possible.
but a jpg with a big huffman tree is probably not possible, i agree.

here is at least an reference page off the official png format
http://www.libpng.org/pub/png/libpng.html
maybe some old code will fit the bill
personaly i am stuck in my basic and mc projects and have only slow progress in c.
meanwhile i keep reading and trying to sharpen my brain, again.
maybe a C_MALLOC_BRAIN
or finishing some old shit to clear my memory?
well
CONTINUE for now then

Re: jpg and png formats

Posted: Thu Jan 13, 2022 9:52 pm
by stefano
I'm pretty sure this won't be a satisfactory answer, but there's a way to actually put a picture in a z88dk program with native tools and libraries: to import it with the sprite editor and make a monochrome sprite out of it to be displayed with putsprite() :D

Re: jpg and png formats

Posted: Sun Jan 16, 2022 5:28 am
by cborn
Thanks for the suggestion but i need it for my gigascreensimulator and thats multicolour.
I did some in basic and if i have that part better then its now, then i can convert it .... ..... ..... maybe ...
and i have to "purify" that asm gigaroutine for 192+1 screen switch only. and keys...