Photon improvement

Anything QL Software or Programming Related.
User avatar
Cristian
Aurora
Posts: 965
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Photon improvement

Post by Cristian »

Probably you already know Photon, the great and useful image processing software by Dave Westbury.
In the Italian QL mailing list (and not only there) is growing the interest of fixing some bugs and lacks of Photon.
Our main problem is to make Photon fit fullscreen an image (wallpaper) in any resolution mode. Indeed currently this function is affected by the screen resolution.

We thought some possible options:
- try again to contact Dave Westbury to get the source code;
- make a little donation to him (or to everyone having the skills) to improve Photon.

Thanks in advance for your help or suggestions.
Last edited by Cristian on Fri Sep 11, 2015 8:11 pm, edited 1 time in total.


Silvester
Gold Card
Posts: 436
Joined: Thu Dec 12, 2013 10:14 am
Location: UK

Re: Photon improvement

Post by Silvester »

Attached zip file with couple of old files that might be of interest until I get new Photon done.

A resident SuperBASIC function which takes JPEG file as input and outputs file as 24 bit RGB/YCbCr, 16bit Q40/QPC, or 8 bit Aurora. Feel free to use it in your own freeware. I've only just given it a quick check, so let me know it you have any problems with it.

Also a transient version of earlier v0.13 Photon (v0j14) which has a JPEG decoder which is about twice as fast. You will only see that real difference using zero dither (option \d0).

Puzzled why people wrapped Photon in SB taskco(?) - You always could LRESPR Photon, it then became a Thing you could invoke from SB command line with EXEP (or better still, 'Execute' JPG files directly from QPAC2 Files using FI2).

I'll post more details of new version when I get my head back into it (Derek, you are very brave to try it from binary!).

Interested to hear any suggestions - although I have already done alot of things probably desired (many years ago, now I have more time).

BTW I only access Internet via local library, so please don't expect immediate replies.
Attachments
fjpeg.zip
(10.32 KiB) Downloaded 150 times


David
User avatar
Cristian
Aurora
Posts: 965
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Re: Photon improvement

Post by Cristian »

Dear Silvester,
since I'm not so skilled, I can't understand 100% of your post. Anyway, it's extremely useful and interesting.
Please let me report to my experienced friends. They'll be happy to give their comments and, I hope, their support. :)


User avatar
QLvsJAGUAR
Gold Card
Posts: 464
Joined: Tue Feb 15, 2011 8:42 am
Location: Lucerne, Switzerland
Contact:

Re: Photon improvement

Post by QLvsJAGUAR »

Beside Photon there’s Photo QL. Both are on the QL/E{nvironment} which is part of THE DISTRIBUTION (see link in the message footer below). For both there’s a small demo script in QL/E. Just enter do do_photontest or do do_phototest and spot the differences. Photon is much faster in JPEG decoding but always covers the complete screen, while Photo QL is slower but works in a window.

I would love to see both OpenSource so that the community could learn from the code and some may even take up the line and continue to develop the program(s).

QL forever!
Urs


QL forever!
https://www.sinclairql.net/ - Go and get THE DISTRIBUTION & QL/E!
https://www.youtube.com/QLvsJAGUAR/community - Blog
https://www.youtube.com/QLvsJAGUAR - Dedicated QL videos
Sinclair, QL, ATARI, JAGUAR, NUON, APPLE, NeXT, MiST & much more...
Videos, pictures & information
Derek_Stewart
Font of All Knowledge
Posts: 3971
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Photon improvement

Post by Derek_Stewart »

Hi,

PhotoQL is a nice application, but there is no save option, I hoped this would be developed further, but the author: Roberto Porro did not continue with it. Since the programme is written in C and no source code available, I doubt it could be extended, but you never know, disassembley of a C68 programme, how hard could that be.

I have tried the new version of Photon on SMSQemulator it works great. Some minor questions:

1. Is the source code availble?

2. Can the ouput of Photon be linked to a channel, pipe or application. For future image manipulation

3. Can the image be saved to PIC or SCR formats.


Regards,

Derek
Derek_Stewart
Font of All Knowledge
Posts: 3971
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Photon improvement

Post by Derek_Stewart »

Hi,

Just read the fjpeg manual, answers all my questions.

So I suppose all that need to be doen is put the output of fjpeg into a graphics programme so that it can be manipulated.


Regards,

Derek
Silvester
Gold Card
Posts: 436
Joined: Thu Dec 12, 2013 10:14 am
Location: UK

Re: Photon improvement

Post by Silvester »

>So I suppose all that need to be done is put the output of fjpeg into a graphics programme so that it can be manipulated.

You could, but before embarking on writing too much SB (or otherwise) wait until I post more details of work already done (and proposed). It may already cover what might want to be done. I only posted FJPEG as something to tinker with (but OK if anyone wants to use it further). More later, but for now, just discovered a SB program I wrote in early days to look inside JPEG file, might be of interest?

Re source code, OK with releasing it eventually once it is finished. But you wont make much sense of it unless you look at JPEG in detail.

(edit: next photon - yes to questions 2 and 3)
Attachments
JPEGdetail.zip
(4.22 KiB) Downloaded 125 times


David
Silvester
Gold Card
Posts: 436
Joined: Thu Dec 12, 2013 10:14 am
Location: UK

Re: Photon improvement

Post by Silvester »

Redone fjpeg_bin to output PIC file format, see fjpeg_txt for new details. Works with Thierry's PIC viewer on Q40 (mode 33), Aurora (mode 16), and SMSQemulator (mode 32). Haven't got GD2 version of EasyPtr so hope WSA fns/procs work with PIC output. Haven't covered QL mode 4/8 PIC output - that would require much dithering to be worthwhile, effectively done in next Photon.

Also outputs PIC mode 64 (24 bit RGB), but invented new mode 65 to output 24 bit YCbCr, useful for monochrome/sepia rendering. (YCbCr is the native JPEG output - RGB has to be calculated from it using signed MUL's.)

(Also slight bug corrected in JPEGdetail_bas, didn't always close channel to last file if you pressed ESCape.)
Attachments
fjpeg.zip
(9.5 KiB) Downloaded 160 times


David
Ralf R.

Re: Photon improvement

Post by Ralf R. »

Great, thank you!


User avatar
Cristian
Aurora
Posts: 965
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Re: Photon improvement

Post by Cristian »

Silvester, Derek,
first of all thank you very much for your efforts and support.
I collected the comments from the Italian mailing list, and so this is the summary:

- Above all, make Photon fit fullscreen an image (like a wallpaper) in any resolution mode, without being affected by the various screen resolutions;
- Scaling the picture proportionally to fit the width or height of the screen and, if possible, with the option to choose the colour to fill the remaining screen areas;
- tile option (repeat the picture to fill the whole screen);
- scaling and zooming the picture;
- possibility to manage tke picture into a window (something like PhotoQ http://www.q40.de/desktop01.jpg)
- saving options: .pic or .scr

Obviouvsly nobody is ordering anything here, but only expressing suggestions and ideas.
Thank you very much in any case
ciao


Post Reply