Re: [Ql-Users] JPG question

2012-01-25 Thread George Gwilt

On 24 Jan 2012, at 15:10, Dilwyn Jones wrote:

> 
 As this was about jpg, Dilwyn did not mention his BMP program that also
 shows BMP files in a window, without distortion, but only 24 bits.
>>> Also does batch conversions. But only tested AFAIK with QPC2/QXL Mode 32 
>>> style screens. There is conversion code for Qx0 Mode 33 screen but I am not 
>>> sure if it has ever been tested (no Q40 or Q60!)
>>> 
>> Well, I have no Qx0 either but have used your BMP to convert to m33 and my 
>> routine to do the same. Converting these to m32 gave the same result, so 
>> they must be ok, or both have identical bugs!
> Ha! I thought someone would have told me by now if they didn't work.
> 
> But, knowing my luck, it will be "identical bugs" :-)
> 
>> As almost everything needs conversion to the native pic format, this pic can 
>> then be saved.
> PE screen save and restore functions in Easyptr all work with PIC files, so 
> although they are large, it serves as a good base point to work from, then it 
> is fairly easy to save as PIC or screen-bytes formats, even Goerge's PSA 
> files for his apps.
> 
> GD2 sprites can be quite large (not sure if there's a limit) - it makes sense 
> to be able to save at least small pictures as sprites.
> 
>> So far I can only convert uncompressed images, RLE sprites are done by Wman2 
>> and can then be pic'd from the the screen.
> I haven't looked at the RLE format much, but I think it's just simple run 
> length encoded as the name implies. I'm sureit's documented in one of the 
> GD2/WMAN2 documents on my website.
> 

Have a look too at Norman Dunbar's useful Wiki.

George
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] JPG question

2012-01-24 Thread Bob Spelten
Op Tue, 24 Jan 2012 21:32:07 +0100 schreef Dilwyn Jones  
:



Bob Spelten wrote:

Now the problems start. The pointer flashes between No-Entry and arrow  
when over the bars, they are difficult to reach.
When I have managed to move the image I can no longer get the pointer  
inside the window!

The mouse is stuck on the bar, so moving it will keep moving the image.
Even when I kill the job I still cannot get the pointer inside the QPC  
window, only on the top of the frame.
The effect is that any jobs running inside QPC are unreachable, Ctrl+C  
has no effect, I have to end the QPC task.

Has anyone run into this?
Yes, but I never really looked into it enough to find a solution. I took  
the easy way out and recoded a different way which worked and I never  
went back to look at it.


In a viewer, what I tend to do is read the pointer position in the  
picture window and depending on where the pointer is, pan or scroll the  
picture in that direction.


If it would help, I could send you the sources for the Launchpad Pic  
Viewer to compare how I code this and the bars problem.



Dilwyn, I based this section on your example from 2009.
If Launchpad is different here, this is worth studying.
But it seems to me to be a PE feature. In principle the window's left-top  
is fixed, when resized to maximum the Wman will place the window in the  
right-bottom and adjust the origin.
Even a less then maximum window, when moved to the right-bottom corner may  
give this "pointer on the bar" reading problem.
A work around could be to calculate the position with more margin, before  
calling MDRAW and not rely on Wman.


Bob

--
The BSJR QL software site at: http://members.chello.nl/b.spelten/ql/
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] JPG question

2012-01-24 Thread Dilwyn Jones

Bob Spelten wrote:

Now the problems start. The pointer flashes between No-Entry and arrow 
when over the bars, they are difficult to reach.
When I have managed to move the image I can no longer get the pointer 
inside the window!

The mouse is stuck on the bar, so moving it will keep moving the image.
Even when I kill the job I still cannot get the pointer inside the QPC 
window, only on the top of the frame.
The effect is that any jobs running inside QPC are unreachable, Ctrl+C has 
no effect, I have to end the QPC task.

Has anyone run into this?
Yes, but I never really looked into it enough to find a solution. I took the 
easy way out and recoded a different way which worked and I never went back 
to look at it.


In a viewer, what I tend to do is read the pointer position in the picture 
window and depending on where the pointer is, pan or scroll the picture in 
that direction.


If it would help, I could send you the sources for the Launchpad Pic Viewer 
to compare how I code this and the bars problem.


Dilwyn Jones 


___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] JPG question

2012-01-24 Thread Bob Spelten
Op Tue, 24 Jan 2012 16:10:30 +0100 schreef Dilwyn Jones  
:



...
GD2 sprites can be quite large (not sure if there's a limit) - it makes  
sense to be able to save at least small pictures as sprites.



I have just produced a 1600x1200 sprite file with PNGCVT, without problems.

This revealed a problem that I suspect is an EasyPTR or SMSQ/E bug.
My QPC2 screen is 1360x730, so this sprite cannot be displayed.
However I can convert the sprite to a pic, reading all lines with PEEK$  
and writing them with UPUT.

So far so good.
Reading back this pic, a PE window is set up to a maximum fit (1348x720)  
with pan/scroll bars, needed to see the whole pic.
Now the problems start. The pointer flashes between No-Entry and arrow  
when over the bars, they are difficult to reach.
When I have managed to move the image I can no longer get the pointer  
inside the window!

The mouse is stuck on the bar, so moving it will keep moving the image.
Even when I kill the job I still cannot get the pointer inside the QPC  
window, only on the top of the frame.
The effect is that any jobs running inside QPC are unreachable, Ctrl+C has  
no effect, I have to end the QPC task.

Has anyone run into this?

Bob

--
The BSJR QL software site at: http://members.chello.nl/b.spelten/ql/
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] JPG question

2012-01-24 Thread gdgqler

On 24 Jan 2012, at 15:10, Dilwyn Jones wrote:

> 
 As this was about jpg, Dilwyn did not mention his BMP program that also
 shows BMP files in a window, without distortion, but only 24 bits.
>>> Also does batch conversions. But only tested AFAIK with QPC2/QXL Mode 32 
>>> style screens. There is conversion code for Qx0 Mode 33 screen but I am not 
>>> sure if it has ever been tested (no Q40 or Q60!)
>>> 
>> Well, I have no Qx0 either but have used your BMP to convert to m33 and my 
>> routine to do the same. Converting these to m32 gave the same result, so 
>> they must be ok, or both have identical bugs!
> Ha! I thought someone would have told me by now if they didn't work.
> 
> But, knowing my luck, it will be "identical bugs" :-)
> 
>> As almost everything needs conversion to the native pic format, this pic can 
>> then be saved.
> PE screen save and restore functions in Easyptr all work with PIC files, so 
> although they are large, it serves as a good base point to work from, then it 
> is fairly easy to save as PIC or screen-bytes formats, even Goerge's PSA 
> files for his apps.
> 
> GD2 sprites can be quite large (not sure if there's a limit) - it makes sense 
> to be able to save at least small pictures as sprites.
> 
>> So far I can only convert uncompressed images, RLE sprites are done by Wman2 
>> and can then be pic'd from the the screen.
> I haven't looked at the RLE format much, but I think it's just simple run 
> length encoded as the name implies. I'm sureit's documented in one of the 
> GD2/WMAN2 documents on my website.
> 

Have a look too at Norman Dunbar's useful Wiki.

George
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] JPG question

2012-01-24 Thread Dilwyn Jones



As this was about jpg, Dilwyn did not mention his BMP program that also
shows BMP files in a window, without distortion, but only 24 bits.
Also does batch conversions. But only tested AFAIK with QPC2/QXL Mode 32 
style screens. There is conversion code for Qx0 Mode 33 screen but I am 
not sure if it has ever been tested (no Q40 or Q60!)


Well, I have no Qx0 either but have used your BMP to convert to m33 and my 
routine to do the same. Converting these to m32 gave the same result, so 
they must be ok, or both have identical bugs!

Ha! I thought someone would have told me by now if they didn't work.

But, knowing my luck, it will be "identical bugs" :-)

As almost everything needs conversion to the native pic format, this pic 
can then be saved.
PE screen save and restore functions in Easyptr all work with PIC files, so 
although they are large, it serves as a good base point to work from, then 
it is fairly easy to save as PIC or screen-bytes formats, even Goerge's PSA 
files for his apps.


GD2 sprites can be quite large (not sure if there's a limit) - it makes 
sense to be able to save at least small pictures as sprites.


So far I can only convert uncompressed images, RLE sprites are done by 
Wman2 and can then be pic'd from the the screen.
I haven't looked at the RLE format much, but I think it's just simple run 
length encoded as the name implies. I'm sureit's documented in one of the 
GD2/WMAN2 documents on my website.


Dilwyn Jones 


___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] JPG question

2012-01-24 Thread Bob Spelten
Op Tue, 24 Jan 2012 14:44:18 +0100 schreef Dilwyn Jones  
:



Bob Spelten wrote:

As this was about jpg, Dilwyn did not mention his BMP program that also  
shows BMP files in a window, without distortion, but only 24 bits.
Also does batch conversions. But only tested AFAIK with QPC2/QXL Mode 32  
style screens. There is conversion code for Qx0 Mode 33 screen but I am  
not sure if it has ever been tested (no Q40 or Q60!)


Well, I have no Qx0 either but have used your BMP to convert to m33 and my  
routine to do the same. Converting these to m32 gave the same result, so  
they must be ok, or both have identical bugs!


I am working on a tool to convert/show bmp (4 bit to 24 bit) as pic  
files in the current mode (16 to 33) in an EasyPTR window.
Scr or pic files of any QL mode can also be converted, work on sprite  
viewing is almost done, I hope.
Will look forward to that - I have an unfinished QL drawing program to  
finish too if ever I have time to finish it!


Dave Westbury was at one point proposing to enhance Photon so that you  
could save the converted jpeg with it too, using it as either a command  
or as a EX/EW filter EX PHOTON,#input,#ouput,#error (can't remember the  
parameter order from memory) but I don't think that was ever finished. I  
did try to contact him about it without success.


Dilwyn, you may remember explaining here how to show pictures in a EasyPTR  
window, back in 2009.
That started this project. But I needed some pictures to show so  
conversion routines were added.
As almost everything needs conversion to the native pic format, this pic  
can then be saved.
So far I can only convert uncompressed images, RLE sprites are done by  
Wman2 and can then be pic'd from the the screen.


Photon can be used to convert from Jpeg if you use a screen grabber to  
capture the displayed QL output picture from the screen.


George's suggestion re making a keyword out of Photon executable using  
Turbo's Task Commander is a handy hint to bear in mind too.



I will investigate,
Bob

--
The BSJR QL software site at: http://members.chello.nl/b.spelten/ql/
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] JPG question

2012-01-24 Thread Dilwyn Jones

Bob Spelten wrote:

As this was about jpg, Dilwyn did not mention his BMP program that also 
shows BMP files in a window, without distortion, but only 24 bits.
Also does batch conversions. But only tested AFAIK with QPC2/QXL Mode 32 
style screens. There is conversion code for Qx0 Mode 33 screen but I am not 
sure if it has ever been tested (no Q40 or Q60!)


I am working on a tool to convert/show bmp (4 bit to 24 bit) as pic files 
in the current mode (16 to 33) in an EasyPTR window.
Scr or pic files of any QL mode can also be converted, work on sprite 
viewing is almost done, I hope.
Will look forward to that - I have an unfinished QL drawing program to 
finish too if ever I have time to finish it!


Dave Westbury was at one point proposing to enhance Photon so that you could 
save the converted jpeg with it too, using it as either a command or as a 
EX/EW filter EX PHOTON,#input,#ouput,#error (can't remember the parameter 
order from memory) but I don't think that was ever finished. I did try to 
contact him about it without success.


Photon can be used to convert from Jpeg if you use a screen grabber to 
capture the displayed QL output picture from the screen.


George's suggestion re making a keyword out of Photon executable using 
Turbo's Task Commander is a handy hint to bear in mind too.


Dilwyn Jones 


___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] JPG question

2012-01-24 Thread Bob Spelten
Op Mon, 23 Jan 2012 17:10:53 +0100 schreef Marcos Cruz  
:


En/Je/On 2012-01-23 14:24, François Van Emelen escribió / skribis /  
wrote :



Op 22/01/2012 20:23, Dilwyn Jones schreef:
>Would be interesting if the new viewer could be accessed from
>other programs in a direct mode like Photon, e.g.



Would be very useful too.


I miss a lot a SBASIC command to show a JPEG image in a window. As far  
as I know, only the BMPCVT extensions by W. Lenerz provide commandsto  
show an image file in a certain window. I use BMPCVT in one project

of mine, but BMP files are huge, what is inconvenient.

Qptr and EasyPTR have commands to create psa/pic files in memory and show  
them in a window.
Remember that pic files are uncompressed like most BMP files so can also  
be quite large.
Some of the BMPCVT commands may produce distortion when BMP lines are  
padded with empty bytes.

Also PhotoQL suffers from that.

As this was about jpg, Dilwyn did not mention his BMP program that also  
shows BMP files in a window, without distortion, but only 24 bits.
I am working on a tool to convert/show bmp (4 bit to 24 bit) as pic files  
in the current mode (16 to 33) in an EasyPTR window.
Scr or pic files of any QL mode can also be converted, work on sprite  
viewing is almost done, I hope.


Bob

--
The BSJR QL software site at: http://members.chello.nl/b.spelten/ql/
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] JPG question

2012-01-24 Thread George Gwilt

On 23 Jan 2012, at 16:10, Marcos Cruz wrote:

>> 
>> Op 22/01/2012 20:23, Dilwyn Jones schreef:
>>> Would be interesting if the new viewer could be accessed from
>>> other programs in a direct mode like Photon, e.g.
> 
>> Would be very useful too.
> 
> I miss a lot a SBASIC command to show a JPEG image in a window. As far as I
> know, only the BMPCVT extensions by W. Lenerz provide commands to show an
> image file in a certain window. I use BMPCVT in one project of mine, but BMP
> files are huge, what is inconvenient.

I have converted PHOTON into the BASIC keyword PHOT using TASCOM from the Turbo 
suite. The manual is in trbom12_zip and the programs (there are 4 slightly 
different versions) are on trbox06_zip.

I use PHOT quite often.

George
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] JPG question

2012-01-23 Thread Marcos Cruz
En/Je/On 2012-01-23 14:24, François Van Emelen escribió / skribis / wrote :

> Op 22/01/2012 20:23, Dilwyn Jones schreef:
> >Would be interesting if the new viewer could be accessed from
> >other programs in a direct mode like Photon, e.g.

> Would be very useful too.

I miss a lot a SBASIC command to show a JPEG image in a window. As far as I
know, only the BMPCVT extensions by W. Lenerz provide commands to show an
image file in a certain window. I use BMPCVT in one project of mine, but BMP
files are huge, what is inconvenient.

Marcos

-- 
http://programandala.net
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] JPG question

2012-01-23 Thread François Van Emelen

Op 22/01/2012 20:23, Dilwyn Jones schreef:


1. Photon, by Dave Westbury (JPG only)
2. Photo-QL, by Roberto Porro (BMP/GIF/JPG/PCX/TGA/PNG/PIC)
3. PQIV by Claus Graf. (PCX, PNG, PIC, TIFF, GIF and JPEG - standard 
version works only on Q40/Q60 but a patch by Marcel Kilgus allows it 
to save in QL mode 32 QPC/QXL format)


Would be interesting if the new viewer could be accessed from other 
programs in a direct mode like Photon, e.g.


EX new_viewer;"input.jpg" to view and EX new_viewer;"input.jpg 
output.file [list of options]"


this would make it available also via FileInfo 2, and any new QL 
graphical software could use it to load/save JPG files.


Dilwyn Jones

Would be very useful too.

François Van Emelen


___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] JPG question

2012-01-22 Thread Geoff Wicks



--
From: "Dilwyn Jones" 
Sent: Sunday, January 22, 2012 7:23 PM
To: 
Subject: Re: [Ql-Users] JPG question


Geoff Wicks wrote:

I have a question to ask to which I should already know the answer, but
unfortunately do not.

Someone has sent me an early version of a program to display JPG images
on a GD2 QL system.

Has this been done before and, if so, by whom?

From what I know:

1. Photon, by Dave Westbury (JPG only)
2. Photo-QL, by Roberto Porro (BMP/GIF/JPG/PCX/TGA/PNG/PIC)
3. PQIV by Claus Graf. (PCX, PNG, PIC, TIFF, GIF and JPEG - standard 
version works only on Q40/Q60 but a patch by Marcel Kilgus allows it to 
save in QL mode 32 QPC/QXL format)


Would be interesting if the new viewer could be accessed from other 
programs in a direct mode like Photon, e.g.


EX new_viewer;"input.jpg" to view and EX new_viewer;"input.jpg output.file 
[list of options]"


this would make it available also via FileInfo 2, and any new QL graphical 
software could use it to load/save JPG files.




Thanks for this information and also to Bob for his reply. I should have 
known about Photon because it is quite an old program that I have tried it 
in the past, but there are so many graphics formats and I had forgotten 
which was supported.


The person in question is a skilled programmer, but very much a "loner" who 
is not always aware of developments in the QL community. His program is in a 
very early stage of development, but I have done some testing and it works 
with all JPGs I have tried, although some needed resizing. He is also trying 
to write a detailed graphics program for GD2 systems, and that is the reason 
he tackled the JPG problem, but at the moment I am not quite sure what he 
wants me to do with them,


Best Wishes,


Geoff 



___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] JPG question

2012-01-22 Thread Dilwyn Jones

Geoff Wicks wrote:

I have a question to ask to which I should already know the answer, but
unfortunately do not.

Someone has sent me an early version of a program to display JPG images
on a GD2 QL system.

Has this been done before and, if so, by whom?
From what I know:


1. Photon, by Dave Westbury (JPG only)
2. Photo-QL, by Roberto Porro (BMP/GIF/JPG/PCX/TGA/PNG/PIC)
3. PQIV by Claus Graf. (PCX, PNG, PIC, TIFF, GIF and JPEG - standard version 
works only on Q40/Q60 but a patch by Marcel Kilgus allows it to save in QL 
mode 32 QPC/QXL format)


Would be interesting if the new viewer could be accessed from other programs 
in a direct mode like Photon, e.g.


EX new_viewer;"input.jpg" to view and EX new_viewer;"input.jpg output.file 
[list of options]"


this would make it available also via FileInfo 2, and any new QL graphical 
software could use it to load/save JPG files.


Dilwyn Jones 


___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] JPG question

2012-01-22 Thread Bob Spelten
Op Sun, 22 Jan 2012 19:32:31 +0100 schreef Geoff Wicks  
:


I have a question to ask to which I should already know the answer, but  
unfortunately do not.


Someone has sent me an early version of a program to display JPG images  
on a GD2 QL system.


Has this been done before and, if so, by whom?

The 2 programs I use are Photon by Dave Westbury and PhotoQL by Roberto  
Porro.
Both work in full colour, Photon uses the whole screen, PhotoQL uses a PE  
window.

They can be found on Dilwyn's site.

Bob

--
The BSJR QL software site at: http://members.chello.nl/b.spelten/ql/
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


[Ql-Users] JPG question

2012-01-22 Thread Geoff Wicks
I have a question to ask to which I should already know the answer, but 
unfortunately do not.

Someone has sent me an early version of a program to display JPG images on a 
GD2 QL system.

Has this been done before and, if so, by whom?

Best Wishes,


Geoff

___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm