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: 351
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: PCHIRES

Post by peacer » Mon Jun 10, 2013 8:38 am

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 303 times

User avatar
Dbug
Site Admin
Posts: 2388
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: PCHIRES

Post by Dbug » Mon Jun 10, 2013 5:09 pm

No objection :)

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

Re: PCHIRES

Post by peacer » Mon Jun 10, 2013 5:55 pm

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: 1169
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: PCHIRES

Post by Symoon » Mon Jun 10, 2013 5:56 pm

Ok for me ;)

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

Re: PCHIRES

Post by peacer » Mon Jun 10, 2013 7:20 pm

Thanks :)

Still trying to make it works.

User avatar
Symoon
Archivist
Posts: 1169
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: PCHIRES

Post by Symoon » Mon Jun 10, 2013 8:06 pm

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
Squad Leader
Posts: 878
Joined: Fri Apr 03, 2009 8:56 am

Re: PCHIRES

Post by ibisum » Mon Jun 10, 2013 8:17 pm

I'm going to try this under WINE, will-co ..

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

Re: PCHIRES

Post by peacer » Mon Jun 10, 2013 8:21 pm

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 6660 times

User avatar
Symoon
Archivist
Posts: 1169
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France
Contact:

Re: PCHIRES

Post by Symoon » Mon Jun 10, 2013 8:47 pm

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: 2388
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: PCHIRES

Post by Dbug » Mon Jun 10, 2013 9:08 pm

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: 351
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: PCHIRES

Post by peacer » Tue Jun 11, 2013 7:06 am

I need to autopsy how those files stores graphic data :) I prefer png too.

Godzil
Squad Leader
Posts: 756
Joined: Sat May 21, 2011 7:21 pm
Location: Between UK and France
Contact:

Re: PCHIRES

Post by Godzil » Mon Jun 24, 2013 11:57 am

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: 351
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: PCHIRES

Post by peacer » Mon Jun 24, 2013 3:22 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests