PNGCodec
Moderator: Graphics Moderators
Well it's not pngcodec that is broken, but the compile farm did something wrong.
Attached a working win32 pngcodec.
Edit: after reading the pngcodec compile logs, it seems the compile farm builds all version with its local g++ instead using the "host" one.
[Edit TrueLight] Compiled executables are now correct [/Edit]
Attached a working win32 pngcodec.
Edit: after reading the pngcodec compile logs, it seems the compile farm builds all version with its local g++ instead using the "host" one.
[Edit TrueLight] Compiled executables are now correct [/Edit]
That would indeed be a problem. I suppose that means that all the pngcodec builds, except for the x86 Linux one, are broken?
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
- PouncingAnt
- Transport Coordinator
- Posts: 357
- Joined: 09 Nov 2004 22:33
Thanks V much for the fix. Hope I my whining helped highlight the problem to some degree... 

NB: the below challenges are still open for submission, so feel free to perform necromancy on them!
Try the PouncingAnt National Monopoly Challenge
Or even better, the PouncingAnt National Monopoly Challenge 2
Or better still, the PouncingAnt National Monopoly Challenge 3
Or, the PouncingAnt National Monopoly Challenge 4
Or try my scenario instead!
-(A lazy) OpenTTD Japanese Translator-
-(A lazy) PNGcodec user-
"You get what you pay for, so pay attention!"
Patches:
Company Station Stats
Try the PouncingAnt National Monopoly Challenge
Or even better, the PouncingAnt National Monopoly Challenge 2
Or better still, the PouncingAnt National Monopoly Challenge 3
Or, the PouncingAnt National Monopoly Challenge 4
Or try my scenario instead!
-(A lazy) OpenTTD Japanese Translator-
-(A lazy) PNGcodec user-
"You get what you pay for, so pay attention!"
Patches:
Company Station Stats
- athanasios
- Tycoon
- Posts: 3138
- Joined: 23 Jun 2005 00:09
- Contact:
Thanks glx.
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
I made a useless script to manage a lot of pictures at the same time. I thought it worked, but that the 32bpp engine was bugged so I posted it here. When I discovered that I had done something wrong I did a lot of work to try to fix it, and when I finaly decided to check how pngcodec actually worked I found that x_offs=-31 and y_offs=-32 worked. I even tried to use algebra to find out how I should calculate the y_offs from a croped image before I tried this.
The script isn't as useful as I thought when I first began to create it(since it is very simple), but I can provide it anyway, in case someone want to use it. But the only reason I didn't delete this was in case someone saw this post and wondered what the result would look like(someone with the same knowlege about pngcodec as when I started with the script)
Edit: Replaced all content, because I didn't know what I was doing when I posted the first time, I only thought I did.
The script isn't as useful as I thought when I first began to create it(since it is very simple), but I can provide it anyway, in case someone want to use it. But the only reason I didn't delete this was in case someone saw this post and wondered what the result would look like(someone with the same knowlege about pngcodec as when I started with the script)
Code: Select all
#!/bin/bash
PNGCODECDIR="/usr/bin"
IMAGEFOLDER="trg1r"
for i in $( ls $IMAGEFOLDER ); do
$PNGCODECDIR/pngcodec r $IMAGEFOLDER/$i x_offs=-31 y_offs=-32
done
Just remember that the x-offs and y-offs can't be -31 by -32 for all images. It depends on the artist and which image he replaces what the offset should be. You might want to look at this list to see the x-offs and y-offs of all original grf images:QtanJ wrote:(..) x_offs=-31 and y_offs=-32 (..)
http://devs.openttd.org/~truelight/orig ... ffsets.txt
I myself use this script to give all images the offset as they were in the original grfs. This in no way is any guarantee the result looks correct!!!
http://devs.openttd.org/~truelight/orig ... offsets.sh
The only thing necessary for the triumph of evil is for good men to do nothing.
Re: PNGCodec
Can someone explain me how can i count x and y offs, again?
I tried to make the png with the same size as the original picture was (copied from the original decoded grf file). I used the original picture also (to test it) and the original picture's offs.
Than i used the pngcodec and i added that offs. It said it worked. So i copyed it back to the tar file, made the info (line copyed and modifyed from a working one).
Than add it to the cfg file.
ZOOM error allways...
And i tried it 213312 times, tried to count pixels and looked at many offs and pictures and still... i cant see logic in that (i su*k in math).
So please help
I tried to make the png with the same size as the original picture was (copied from the original decoded grf file). I used the original picture also (to test it) and the original picture's offs.
Than i used the pngcodec and i added that offs. It said it worked. So i copyed it back to the tar file, made the info (line copyed and modifyed from a working one).
Than add it to the cfg file.
ZOOM error allways...
And i tried it 213312 times, tried to count pixels and looked at many offs and pictures and still... i cant see logic in that (i su*k in math).
So please help

Re: PNGCodec
The tar and the extra zoom levels are of the obsolete 32bpp branch (pngcodec is not used there).
pngcodec is used for 32bpp images in trunk.
pngcodec is used for 32bpp images in trunk.
Re: PNGCodec
Oh! Is there a new way to do it? Where can i find a post about how to do it?Rubidium wrote:The tar and the extra zoom levels are of the obsolete 32bpp branch (pngcodec is not used there).
pngcodec is used for 32bpp images in trunk.
Re: PNGCodec
Try the sticky just three posts below this one.... might be usefuln0k0m wrote:Oh! Is there a new way to do it? Where can i find a post about how to do it?Rubidium wrote:The tar and the extra zoom levels are of the obsolete 32bpp branch (pngcodec is not used there).
pngcodec is used for 32bpp images in trunk.

The only thing necessary for the triumph of evil is for good men to do nothing.
Re: PNGCodec
Omg, Ban please. I am so blind today 

-
- Tycoon
- Posts: 1656
- Joined: 08 Jun 2007 08:00
Re: PNGCodec
Hmm. I was pngcodecing some things and found out that there are image editors that support text fields in. I'm particulary talking about gimp here.
I post the screenshot here.
I don't know is it possible to change that line when saving files
but if that can be done (I mean particulary that "comment=" side of that)
then gimpers can codec their pngs w/o pngcodec too.
I mean the comment should be replaced with x_offs or y_offs and the comment itself with proper values. Though I think it would be possible to give it only one field not both x and y
I'm not so sure
BTW the 32bpp pngs with that comment work with openttd too. So there is no need of removing these
I post the screenshot here.
I don't know is it possible to change that line when saving files
Code: Select all
comment=created with the gimp
then gimpers can codec their pngs w/o pngcodec too.
I mean the comment should be replaced with x_offs or y_offs and the comment itself with proper values. Though I think it would be possible to give it only one field not both x and y

I'm not so sure
BTW the 32bpp pngs with that comment work with openttd too. So there is no need of removing these
- Attachments
-
- example.png (35.25 KiB) Viewed 7197 times
Re: PNGCodec
You can change the comment for example with this GIMP plugin:lordazamath wrote:I don't know is it possible to change that line when saving files
ecomment
Re: PNGCodec
OpenTTD ignores all fields besides x_offs and y_offs. So feel free to add any other field you likelordazamath wrote: BTW the 32bpp pngs with that comment work with openttd too. So there is no need of removing these

The only thing necessary for the triumph of evil is for good men to do nothing.
Re: PNGCodec
Right.
How the hell do i use this dam thing?
I know it's a commandline program, but when i try and do anything on it's list i get this:
What does that mean?
And why doesn't this thing have a manual?
How the hell do i use this dam thing?
I know it's a commandline program, but when i try and do anything on it's list i get this:
Code: Select all
'pngprops' is not recognized as an internal or external command,
operable program or batch file.
And why doesn't this thing have a manual?
-
- Traffic Manager
- Posts: 152
- Joined: 28 Jan 2006 15:00
Re: PNGCodec
What OS are you using Windows XP? What command did you type in? For win32 I think it is
You could also post your brickland rail sprites (in the brickland thread)and I'll pncodec them for you.
Code: Select all
pngcodec.exe a <filename>.png x_offs=xx y_offs=xx
Re: PNGCodec
I have a question too:
- Attachments
-
- error.PNG (1.57 KiB) Viewed 7568 times
Sorry for my very bad English!!! 
I am 3dsmax artist.

I am 3dsmax artist.
Who is online
Users browsing this forum: nihues and 9 guests