GRFcodec -> garbled pcx output

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Post Reply
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5705
Joined: 31 Mar 2007 14:23
Location: Lost in Music

GRFcodec -> garbled pcx output

Post 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 970 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 42 times
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: GRFcodec -> garbled pcx output

Post by FooBar »

I.e. have the width and height of you pcx file a multiple of 4.
michael blunck
Tycoon
Tycoon
Posts: 5954
Joined: 27 Apr 2005 07:09
Contact:

Re: GRFcodec -> garbled pcx output

Post 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
Image
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 15 guests