Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sun May 19, 2013 2:18 am

All times are UTC




Post new topic Reply to topic  [ 61 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: PNGCodec
PostPosted: Wed Dec 12, 2007 7:52 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Sat Jan 28, 2006 3:00 pm
Posts: 152
Location: Delft / Overasselt, Netherlands
Or try using the path from pngcodec to the png file


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Wed Dec 12, 2007 9:31 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Wed Feb 28, 2007 9:02 am
Posts: 137
Location: Czech Republic - Středočeský kraj - Benešovsko - Buková Lhota :)
But I have pngcodec and .png file in the same folder!!!!!! :?
I really don´t know! :(

_________________
Sorry for my very bad English!!! :(
I am 3dsmax artist.


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Thu Dec 13, 2007 3:09 am 
Offline
TTDPatch Developer
TTDPatch Developer

Joined: Wed Feb 18, 2004 3:06 am
Posts: 10285
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.

_________________
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


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Thu Dec 13, 2007 8:26 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Wed Feb 28, 2007 9:02 am
Posts: 137
Location: Czech Republic - Středočeský kraj - Benešovsko - Buková Lhota :)
Thank you, I think that it work correctly now! :D

_________________
Sorry for my very bad English!!! :(
I am 3dsmax artist.


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Fri Jan 25, 2008 4:13 pm 
Offline
Engineer
Engineer

Joined: Fri Jan 25, 2008 2:34 pm
Posts: 5
Location: NL
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:
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:
FOR /F "tokens=1-3" %%Q IN (new.log) DO pngcodec.exe r %%Q %%R %%S

Cheers.
M.v.Gulik.

edit: code 2 correction.


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Sat Apr 12, 2008 8:51 pm 
Offline
Engineer
Engineer
User avatar

Joined: Sat Sep 22, 2007 12:45 pm
Posts: 44
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


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Sat Apr 12, 2008 8:56 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Feb 09, 2006 7:15 pm
Posts: 3697
You're not running it from the console.


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Sat Apr 12, 2008 8:57 pm 
Offline
Engineer
Engineer
User avatar

Joined: Sat Sep 22, 2007 12:45 pm
Posts: 44
the console ?, sorry im not very good at computer sometimes


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Sat Apr 12, 2008 9:57 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Nov 20, 2005 1:56 am
Posts: 1225
Location: Dubai, UAE
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.

_________________
Ben


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Sat Apr 12, 2008 10:15 pm 
Offline
President
President
User avatar

Joined: Sun Jun 03, 2007 10:22 pm
Posts: 949
You can find an example here:
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.


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Thu Mar 19, 2009 8:52 am 
Offline
Engineer
Engineer

Joined: Mon Mar 16, 2009 5:51 pm
Posts: 1
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...


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Sun Mar 29, 2009 9:52 am 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Wed Mar 30, 2005 9:43 am
Posts: 1465
Yes, OpenTTD supports alpha transparency.

_________________
He's like, some kind of OpenTTD developer.


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Tue Oct 13, 2009 6:17 pm 
Offline
Engineer
Engineer

Joined: Tue Oct 13, 2009 3:58 pm
Posts: 2
I have an image
Attachment:
1017_z0.png
1017_z0.png [ 58.82 KiB | Viewed 2261 times ]

What options should I specify in pngcodec, so it is normally displayed in Openttd

English do not know, used an interpreter -_-


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Fri Oct 16, 2009 1:47 am 
Offline
TTDPatch Developer
TTDPatch Developer

Joined: Wed Feb 18, 2004 3:06 am
Posts: 10285
The ones that cause it to be displayed normally in OpenTTD.

It's a trial-and-error process.

_________________
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


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Mon Jan 11, 2010 2:48 pm 
Offline
Tycoon
Tycoon

Joined: Sat Mar 15, 2008 7:02 am
Posts: 1492
Are there any graphics that need to be adjusted in PNGCodec? I want to test it out and see how it goes.

_________________
Image


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Mon Jan 11, 2010 10:43 pm 
Offline
Tycoon
Tycoon

Joined: Mon Jul 10, 2006 12:43 am
Posts: 1768
Location: Spain
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.

_________________
Sorry if my english is too poor, I want learn it, but it isn't too easy.


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Tue Feb 09, 2010 1:04 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed May 16, 2007 4:59 pm
Posts: 2624
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...

_________________
GRVTS/eGRVTS --- Generic Tram Set --- UK Town Set --- zBase ---RichardWheeler.net


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Tue Feb 09, 2010 1:18 pm 
Offline
Tycoon
Tycoon

Joined: Mon Jul 10, 2006 12:43 am
Posts: 1768
Location: Spain
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:
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.

_________________
Sorry if my english is too poor, I want learn it, but it isn't too easy.


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Tue Feb 09, 2010 1:26 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed May 16, 2007 4:59 pm
Posts: 2624
Greatest apologies for failing in such an epic way! :oops:

_________________
GRVTS/eGRVTS --- Generic Tram Set --- UK Town Set --- zBase ---RichardWheeler.net


Top
 Profile  
 
 Post subject: Re: PNGCodec
PostPosted: Tue Feb 23, 2010 10:23 pm 
Offline
Engineer
Engineer
User avatar

Joined: Mon Aug 07, 2006 9:52 am
Posts: 24
Location: Romania
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.

_________________

Visual PNG codec - Win32 GUI based alternative for PNG codec
PNG crop - Win32 Console based tool for PNG cropping
PNG Resize - Win32 Console based tool for PNG Resizing (z0 -> z1 / z2)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 61 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000-2013 phpBB Group

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2013.
Hosted by Zernebok Hosting.