Page 3 of 4

Re: PNGCodec

Posted: 12 Dec 2007 19:52
by Leviath.NL
Or try using the path from pngcodec to the png file

Re: PNGCodec

Posted: 12 Dec 2007 21:31
by Wacki
But I have pngcodec and .png file in the same folder!!!!!! :?
I really don´t know! :(

Re: PNGCodec

Posted: 13 Dec 2007 03:09
by DaleStan
Wacki wrote:Image
But I have pngcodec and .png file in the same folder!!!!!! :?
I really don´t know! :(
That's as may be, but the file you specified there is relative to the path in the command prompt, not any other path, so it's D:\4622.png. If that's not where the file is, then you need to specify that the file is somewhere else.

Re: PNGCodec

Posted: 13 Dec 2007 08:26
by Wacki
Thank you, I think that it work correctly now! :D

Re: PNGCodec

Posted: 25 Jan 2008 16:13
by MvGulik
Hi

Just sharing something seemingly minor about Pngcodec.
(using: Pngcodec, r10512, win32. On XP/sp2)

Short version:
Its possible to save 'y_offs' or 'x_offs' data with Pngcodec that contain [CR] characters.

Pngcodec will output the [CR] as is.
(Exiftool shows the [CR] as a dot.)

OpenTTD seems not to be effected by this. (when the [CR] character is the last character)

Some quick dos(win) bat code's. (no spaces in path or file names)
1) generate png data list.

Code: Select all

dir /s /b *.png > out1.log
echo.>out2.log
FOR /F %%Q IN (out1.log) DO pngcodec.exe l %%Q >> out2.log
2) for after editing png data list. (remove all but 'y_offs' or 'x_offs' settings/keys.)

Code: Select all

FOR /F "tokens=1-3" %%Q IN (new.log) DO pngcodec.exe r %%Q %%R %%S
Cheers.
M.v.Gulik.

edit: code 2 correction.

Re: PNGCodec

Posted: 12 Apr 2008 20:51
by bazil14
hello, i was trying to use pngcodec, but everytime i run the program it closes itsself within a second :( i see some text (about pngprops) but it goes within the second) does have anyidea what im doing wrong, if so can you tell me and i will be very happy

Re: PNGCodec

Posted: 12 Apr 2008 20:56
by Rubidium
You're not running it from the console.

Re: PNGCodec

Posted: 12 Apr 2008 20:57
by bazil14
the console ?, sorry im not very good at computer sometimes

Re: PNGCodec

Posted: 12 Apr 2008 21:57
by Ben_Robbins_
It means that you need to run it from something like command prompt. If I were you I'd do what I do and make a .bat file and click that. I find that's quicker and easier. There are some .bat's in the .blend thread in some of my recent posts. To edit them change the name to 'something.txt', instead of 'something.bat' then open and edit the necessary bit's, rename back to .bat and run. Make sure the pngcodec.exe is in that same folder.

Re: PNGCodec

Posted: 12 Apr 2008 22:15
by GeekToo
You can find an example here:
http://www.tt-forums.net/viewtopic.php?p=658581#p658581

Look in the other.rar file.

Another hint: if you're pngcodecing longer trains, try to use the Ctrl-B key in the game, it will show the bounding boxes. That can help you to avoid graphical glitches.

Re: PNGCodec

Posted: 19 Mar 2009 08:52
by S-ed
As I know 32bpp means 24bit color(8*RGB) + 8bit Alpha, so...

Does PNGCodec (and Open TTD) supports alpha blending? :?:

p.s.: Sorry but cant find answer in forum...

Re: PNGCodec

Posted: 29 Mar 2009 09:52
by peter1138
Yes, OpenTTD supports alpha transparency.

Re: PNGCodec

Posted: 13 Oct 2009 18:17
by Eudelis
I have an image
1017_z0.png
1017_z0.png (58.82 KiB) Viewed 6176 times
What options should I specify in pngcodec, so it is normally displayed in Openttd

English do not know, used an interpreter -_-

Re: PNGCodec

Posted: 16 Oct 2009 01:47
by DaleStan
The ones that cause it to be displayed normally in OpenTTD.

It's a trial-and-error process.

Re: PNGCodec

Posted: 11 Jan 2010 14:48
by Wasila
Are there any graphics that need to be adjusted in PNGCodec? I want to test it out and see how it goes.

Re: PNGCodec

Posted: 11 Jan 2010 22:43
by maquinista
Wasila wrote:Are there any graphics that need to be adjusted in PNGCodec? I want to test it out and see how it goes.
Most of graphics ready has been coded. Most of the work needed is new sprites, for example, the road stops or some factories.

Re: PNGCodec

Posted: 09 Feb 2010 13:04
by Zephyris
Would it be possible to add a command to view the current x_offs and y_offs of a file? Or is there some other way of doing this? It would be useful for copying good offsets from existing graphics...

Re: PNGCodec

Posted: 09 Feb 2010 13:18
by maquinista
Zephyris wrote:Would it be possible to add a command to view the current x_offs and y_offs of a file? Or is there some other way of doing this? It would be useful for copying good offsets from existing graphics...

Code: Select all

Usage:
 to list properties:      pngcodec l <filename>
 to clear all properties: pngcodec c <filename>
 to replace properties:   pngcodec r <filename> [key=value] [key=value] [...]
 to add properties:       pngcodec a <filename> [key=value] [key=value] [...]
Use the first comand.

Re: PNGCodec

Posted: 09 Feb 2010 13:26
by Zephyris
Greatest apologies for failing in such an epic way! :oops:

Re: PNGCodec

Posted: 23 Feb 2010 22:23
by coyoteelabs
Looks like a lot of people don't look in the NewGRF Technical Discussions section.

A GUI based alternative for PNG codec I wrote has been available since May 2009 for Windows (should work with Wine).

I just made a big improvement to the program and some of the features it has:
* visual placement of png sprites and offset editing
* can display any number of sprites at the same time (useful for buildings split across several tiles)
* built-in CROP tool to remove empty space from sprites (with auto-detection for maximum safe cutting)
* drag & drop

and more.

Enjoy

Visual PNG codec thread.