Page 1 of 1

GRFcodec -> garbled pcx output

Posted: 03 Nov 2008 21:51
by andythenorth
I'm having fun learning nfo, but I have run into problems with garbled output. Screenshot below (created using grf2html - but also garbled in game)
pcx_problem.png
pcx_problem.png (14.69 KiB) Viewed 972 times
This appears to be limited to one pcx. Substituting the Fourtrac.pcx with an alternative pcx produces correct results.

The source graphics are created in a layered photoshop file, exported to a png, which is then opened, and saved to pcx.

I have tried both 24 bit and 8 bit png files. I index where necessary using a 256 colour palette file which I believe is free from problems.

Pasting the contents of the Fourtrac.pcx into another pcx does appear to work, there I suspect something is odd with either the palette of the png files, or with photoshop's pcx output. I have perhaps 300 png files to code, and I was hoping to use photoshop actions to process them into pcx, therefore this issue is of some concern.

png and pcx files are attached in a zip. I would be most grateful for any help debugging this, or for any suggestions of alternative workflow.

One final thought - is there any way to have grfcodec work directly with png files? A search suggests that feature is in progress but not complete. Dale Stan - can you comment on that perhaps?

cheers,

Andy

NFO code (the paths are correct for the files as found on my filesystem).

Code: Select all

  // Fourtrac	Wheeled Tractor (high speed)	32t		1970-1991	35mph
  812 * 14	 04 01 7F 01 07 "Fourtrac" 00
  813 * 4	 01 01 01 08      // Action 1 | RV | 1 sprite set | 8 members 
  814 Y:\Documents\OTTD graphics\HEQS_build\Full HEQS\sprites\tractors/Fourtrac.pcx 34 9 01 24 12 -5 -13
  815 Y:\Documents\OTTD graphics\HEQS_build\Full HEQS\sprites\tractors/Fourtrac.pcx 66 9 01 20 26 -17 -9
  816 Y:\Documents\OTTD graphics\HEQS_build\Full HEQS\sprites\tractors/Fourtrac.pcx 98 9 01 16 36 -18 -8
  817 Y:\Documents\OTTD graphics\HEQS_build\Full HEQS\sprites\tractors/Fourtrac.pcx 146 9 01 20 26 -9 -10
  818 Y:\Documents\OTTD graphics\HEQS_build\Full HEQS\sprites\tractors/Fourtrac.pcx 178 9 01 24 12 -5 -13
  819 Y:\Documents\OTTD graphics\HEQS_build\Full HEQS\sprites\tractors/Fourtrac.pcx 210 9 01 20 26 -17 -9
  820 Y:\Documents\OTTD graphics\HEQS_build\Full HEQS\sprites\tractors/Fourtrac.pcx 242 9 01 16 36 -18 -8
  821 Y:\Documents\OTTD graphics\HEQS_build\Full HEQS\sprites\tractors/Fourtrac.pcx 290 9 01 20 26 -9 -10
tractors.zip
(24.36 KiB) Downloaded 43 times

Re: GRFcodec -> garbled pcx output

Posted: 03 Nov 2008 22:20
by michael blunck

Re: GRFcodec -> garbled pcx output

Posted: 04 Nov 2008 07:33
by FooBar
I.e. have the width and height of you pcx file a multiple of 4.

Re: GRFcodec -> garbled pcx output

Posted: 04 Nov 2008 08:17
by michael blunck
FooBar wrote:I.e. have the width and height of you pcx file a multiple of 4.
In fact, height is insignificant here. Only width matters and should be indeed a multiple of 4.

regards
Michael