Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Antoni, I have a problem using your JPEG viewer
#1
Antoni,
I was trying to use your JPEG Viewer(JPEGV Beta Version 2 by Antoni Gual (agual@eic.ictnet.es) march 2001) in qb7.1. But it gives an error("Unknown error") on the following line:
IF GETword <> 65496 THEN ERROR 99 in the JPEGGetParms (jfile) subroutine.

Do you know why this occurs? When I try using this prog in qb 4.5 it works perfectly!

Please tell me if you can fix this. Since I have no choice but to work in qb 7.1.
Reply
#2
Type ERROR 99 into the immediate window. As you can see, that line stops the program and reports an unknown error. So GETword must not be equal to 65496 for some reason. My guess is the input file is invalid or corrupted (assuming GETword reads in a word from the input file). Are you testing it with the same file each time?
Reply
#3
No, I used several different files and all of them give the same error.

Why should the same prog work in Qb 4.5 and NOT in QB7.1? I havent touched it!
Reply
#4
Does the program use VARSEG with a string variable anywhere in the program? If so that should be replaced with SSEG.

QB 4.5 specific programs may PEEK/POKE to strings without any DEF SEG statements, this works in 4.5, but not in 7.1

It can sometimes take a lot of work to make a program written for 4.5 work in 7.1, I wouldn't expect it to work untouched unless it was intentionally written to work in both.
Reply
#5
Are you on right now? Do u use MSN IM? We can talk directly instead of posting here.
Reply
#6
**finds a copy of the program under an inch of dust**

Sorry for being late to the thread!
And sorry for forgetting to activate ON ERROR when I released the program. In fact error 99 was defined by me. It means the file being read does'nt have the correct header. 65496 is just FFC0 (the header a JPEG file should have) in big endian order.

Probably the problem is caused by the JPEGGetbyte routine setting the segment to the DGroup to adress my file buffer. PDS can be set to store strings elsewhere. I have no PDS to test but
I think if you set PDS to store strings in DGroup everything will work...
Antoni
Reply
#7
Quote:**finds a copy of the program under an inch of dust**

Sorry for being late to the thread!
And sorry for forgetting to activate ON ERROR when I released the program. In fact error 99 was defined by me. It means the file being read does'nt have the correct header. 65496 is just FFC0 (the header a JPEG file should have) in big endian order.

Probably the problem is caused by the JPEGGetbyte routine setting the segment to the DGroup to adress my file buffer. PDS can be set to store strings elsewhere. I have no PDS to test but
I think if you set PDS to store strings in DGroup everything will work...

Well, cant u just find a copy of qb 7.1 and fix it so that it works?

Here I did half the work for u:

http://www.qbcafe.net/cgi-bin/downloads/...=pds71.exe

Also, If i am able to use ur JPG loader u will have credit for that and a lot :king:
Reply
#8
Quote:I have no PDS to test but
I think if you set PDS to store strings in DGroup everything will work...
It lets you compile with near strings, but not run in the IDE with them. It's an option in the Make Exe dialog box.

There's nothing to fix, BBQ, you just have to select "Near Strings" under "Size/Capacity".
Reply
#9
Quote:
Antoni Gual Wrote:I have no PDS to test but
I think if you set PDS to store strings in DGroup everything will work...
It lets you compile with near strings, but not run in the IDE with them. It's an option in the Make Exe dialog box.

There's nothing to fix, BBQ, you just have to select "Near Strings" under "Size/Capacity".

Ok, it worked. Thanks. But I still would have had liked if it worked in the IDE
Reply
#10
Try modifying JPEGGetbyte:
change

Code:
DEFSEG

to
Code:
DEFSEG=SSEG(buf$)

It should work both with far and near strings
Antoni
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)