PCHIRES

Questions, bug reports, features requests, ... about the Oric Software Development Kit. Please indicate clearly in the title the related element (OSDK for generic questions, PictConv, FilePack, XA, Euphoric, etc...) to make it easy to locate messages.

User avatar
peacer
Flight Lieutenant
Posts: 451
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: PCHIRES

Post by peacer »

I've succesfully compiled the program under visual basic 6.0 and now its working under 64 bit windows 7 too.

If you get "Component 'comdlg32.ocx' or one of its dependencies not correctly registered: a file is missing or invalid" error on Windows XP/Vista/7: ;

1- Extract comdlg32.ocx file that I added into the archive.
2- Move comdlg32.ocx to C:\Windows\system32 folder. For 64bit Vista/Win7, move comdlg32.ocx to C:\Windows\SysWOW64
3- Open a command line window in administrator privileges and type following command:
regsvr32 C:\Windows\system32\comdlg32.ocx
Note: On 64bit Vista/Win7, run this command instead:
regsvr32 c:\Windows\SysWOW64\comdlg32.ocx
Note : I hope simon and dbug allow this. If its a problem I can delete the file.
Attachments
PC-Hires VB 6.0.rar
(69.82 KiB) Downloaded 598 times
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: PCHIRES

Post by Dbug »

No objection :)
User avatar
peacer
Flight Lieutenant
Posts: 451
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: PCHIRES

Post by peacer »

There's a problem again..

I couldn't get any pc file into new version. Is it my fault or is it fault of newly compiled one (again, my fault :P)

I created 240x200 2 coloured uncompressed tiff file but I always get "this type of file is not supported" error. This happens in lbm and iff pics too.

Can you please inform me if you are able to convert or not. Maybe during upgrade to vb 6.0 an error happens in the program or its just because I can't create suitable picture file...
User avatar
Symoon
Archivist
Posts: 2301
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Re: PCHIRES

Post by Symoon »

Ok for me ;)
User avatar
peacer
Flight Lieutenant
Posts: 451
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: PCHIRES

Post by peacer »

Thanks :)

Still trying to make it works.
User avatar
Symoon
Archivist
Posts: 2301
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Re: PCHIRES

Post by Symoon »

As I only have 32-bits XP, I'm not sure I can help.
Now if you look carefully the beginning of this thread, I explain the way files are loaded is really dirty.
At the time, we knew, for instance, Paint Shop Pro 3 produced a file of a certain size, so if the file matched this size, the data began at this position. So PCHires can open only a few files made by specific (old) programs.

Some will laugh at me but hey, I was just trying to do what I could ;)
Trying to understand the TIF structure to load any TIF file would be required here, same for LBM and so on...
User avatar
ibisum
Wing Commander
Posts: 1643
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: PCHIRES

Post by ibisum »

I'm going to try this under WINE, will-co ..
User avatar
peacer
Flight Lieutenant
Posts: 451
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: PCHIRES

Post by peacer »

Now I am examining the file structure and program code.

Whatever I do, the created TIF file is 6497 byte and LBM file is 6074 byte. I've added example file to this message.

In source code I think the lines detecting the file type are as follows
taille = FileLen(CMDialog1.FileName)
Select Case taille
Case 6008, 6228, 6250, 12452, 6062
depart = taille - 5999
Case 6418 ' Tif PSP 5
depart = 245
Case 6195, 6174 '6174= Tif MS
depart = 9
Case 6386
depart = 225
And as 6497 and 6074 are absent, program gives error.

I am using paintshop pro 8 to create required files. I think we have to work on structure of tif file..
Attachments
oric.tif
oric.tif (6.34 KiB) Viewed 18311 times
User avatar
Symoon
Archivist
Posts: 2301
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Re: PCHIRES

Post by Symoon »

peacer wrote:In source code I think the lines detecting the file type are as follows
taille = FileLen(CMDialog1.FileName)
Select Case taille
Case 6008, 6228, 6250, 12452, 6062
depart = taille - 5999
Case 6418 ' Tif PSP 5
depart = 245
Case 6195, 6174 '6174= Tif MS
depart = 9
Case 6386
depart = 225
And as 6497 and 6074 are absent, program gives error.
That's it.
"Taille" means "size", understant "file size".
Each drawing program produced files with specific headers, that made the file size change. I had to remove this header to access the picture data.
"depart" means "beginning".
As you can see, for each accepted size, this code calculates where to begin reading the picture data in the file (in other words, it ignores the headers).

So you can add you file sizes there, as long as you know where is located the picture in your file (the less easy part). Then recompile and there you go!
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: PCHIRES

Post by Dbug »

While you are at it, if you could handle TGA or PNG instead of TIFF, that would be nice :)
User avatar
peacer
Flight Lieutenant
Posts: 451
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: PCHIRES

Post by peacer »

I need to autopsy how those files stores graphic data :) I prefer png too.
Godzil
Squad Leader
Posts: 774
Joined: Sat May 21, 2011 7:21 pm
Location: Between UK and France
Contact:

Re: PCHIRES

Post by Godzil »

VB6 is quite old now, but there should already been PNG library for it. PNG is not a simple format at TIFF/BMP can be
User avatar
peacer
Flight Lieutenant
Posts: 451
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: PCHIRES

Post by peacer »

Yes there are png load codes for vb.net etc but I couln't implement it to vb6.
Post Reply