Loading SCR to screen

Anything QL Software or Programming Related.
User avatar
Outsoft
Super Gold Card
Posts: 695
Joined: Sat Apr 19, 2014 1:30 pm
Location: Italy
Contact:

Re: Loading SCR to screen

Post by Outsoft »

dilwyn wrote:
swensont wrote:Thanks Silvester, I'll have to give this a try. My first step was getting an JPEG image over to the QL. I created an image that was 200 pixels wide (and almost 200 high). I save it as .jpg and as .bmp.

I first tried BMP from Dilwyns site. That seems to lock up when I tried to do the convert. I got the "stop" symbol as a mouse. When I tried to kill the job, it was not listed.

I next tried the updated BMP (BMP102e). I basically got the same issue. I could view the picture just fine, but could not get it to convert to PIC.

I then tried the package PHGTK and tried the FJPEG() routine to convert the jpeg version to PIC. I kept getting "invalid syntax" when I tried that routine.

I have not tried the Windows programs that will convert from BMP to PIC because I'm using Linux. Granted I do have WINE installed, but I hoped the SMSQ/E based tools would work.

Tim Swenson
BMP was only ever intended to convert Windows files. The most recent version was updated by Bob Spelten jr - it might be worth liaising with him to seeif he is prepared to look at a sample file to see what the issue might be, for example if there are reversed order bytes in a non-Windows BMP.
Circumstances at the moment mean I won't get much time to do anything much on the QL in the near future.
Best wishes for all Dilwyn.


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

Re: Loading SCR to screen

Post by Silvester »

swensont wrote:Thanks Silvester, I'll have to give this a try. My first step was getting an JPEG image over to the QL. I created an image that was 200 pixels wide (and almost 200 high). I save it as .jpg and as .bmp.

I first tried BMP from Dilwyns site. That seems to lock up when I tried to do the convert. I got the "stop" symbol as a mouse. When I tried to kill the job, it was not listed.

I next tried the updated BMP (BMP102e). I basically got the same issue. I could view the picture just fine, but could not get it to convert to PIC.

I then tried the package PHGTK and tried the FJPEG() routine to convert the jpeg version to PIC. I kept getting "invalid syntax" when I tried that routine.

I have not tried the Windows programs that will convert from BMP to PIC because I'm using Linux. Granted I do have WINE installed, but I hoped the SMSQ/E based tools would work.

Tim Swenson
Try PNG (lossless, and better than BMP). Use FPNG to convert to GD2 mode PIC.

What exactly was the error code from FPJEG? (maybe it was progressive). PNG is better, JPEG will lose quality.

Here's latest before I add it to PHGTK:

If channel omitted default to #1.
Literal filenames don't need to be in quotes.
Mode 4/8 partial save now by pixel (not word boundary).
Attachments
fun.zip
(2.18 KiB) Downloaded 316 times


David
User avatar
BSJR
Trump Card
Posts: 186
Joined: Sun Oct 18, 2015 12:53 pm
Location: Amsterdam
Contact:

Re: Loading SCR to screen

Post by BSJR »

swensont wrote:Thanks Silvester, I'll have to give this a try. My first step was getting an JPEG image over to the QL. I created an image that was 200 pixels wide (and almost 200 high). I save it as .jpg and as .bmp.

I first tried BMP from Dilwyns site. That seems to lock up when I tried to do the convert. I got the "stop" symbol as a mouse. When I tried to kill the job, it was not listed.

I next tried the updated BMP (BMP102e). I basically got the same issue. I could view the picture just fine, but could not get it to convert to PIC.

I then tried the package PHGTK and tried the FJPEG() routine to convert the jpeg version to PIC. I kept getting "invalid syntax" when I tried that routine.

I have not tried the Windows programs that will convert from BMP to PIC because I'm using Linux. Granted I do have WINE installed, but I hoped the SMSQ/E based tools would work.

Tim Swenson
Tim,

I just tried to convert some BMP files using BMP102e and it worked OK.
The previous time I used it, there was an issue but I have to find my notes on that to know if it is related.
As Dilwyn suggested, feel free to send me the problem BMP and maybe I can fix what is going wrong.

I also suggest you try SQRview from my site (plug), which can convert BMP to PIC too, from many bit modes where BMP only does 24 bits.
At the moment I am close to releasing a new version 1.02 that includes the JPG, PNG & GIF routines created by Silvester.
Once that's done I will have a look at BMP again.

Bob


swensont
Forum Moderator
Posts: 252
Joined: Tue Dec 06, 2011 3:30 am
Location: SF Bay Area
Contact:

Re: Loading SCR to screen

Post by swensont »

Bob,

SQRview did the trick. Took me a few min to figure out how it works, but it was able to convert the BMP image to PIC.

I then used FPIC_LOAD to load the image to the screen. Now that I have it working with a test image, I can press forward.

Thanks,

Tim Swenson


User avatar
BSJR
Trump Card
Posts: 186
Joined: Sun Oct 18, 2015 12:53 pm
Location: Amsterdam
Contact:

Re: Loading SCR to screen

Post by BSJR »

swensont wrote:Bob,

SQRview did the trick. Took me a few min to figure out how it works, but it was able to convert the BMP image to PIC.

I then used FPIC_LOAD to load the image to the screen. Now that I have it working with a test image, I can press forward.

Thanks,

Tim Swenson
Good to see this worked.
I tested your BMP example on my W$7/QPC2 machine and my Lubuntu/wine/QPC2 machine and found no problems in viewing and converting with BMP_obj. Also SMSQmulator8 presented no problems.

The BMP header Gimp created, is not the usual 54 bytes but well within the BMP guidelines and thus accepted as vaild by BMP_obj & SQRview.
The older BMP_obj (v1.01) however will show a distorted image, as it expects the 54 byte header but does not crash on it.
The question why it did not work for you remains unanswered.

Bob


Post Reply