Visual PNG Codec

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
User avatar
coyoteelabs
Engineer
Engineer
Posts: 27
Joined: 07 Aug 2006 09:52
Location: Romania

Visual PNG Codec

Post by coyoteelabs »

I'm happy to present to you version 0.6 of the Visual PNG Codec program.

This program is intended to ease the coding of the png files with the x_offs and y_offs meta-data using a graphical interface (instead of the console mode only version of png codec).

Features:
  • Add as many sprites as you want
  • Visualy set the x_offs and y_offs values
  • Easy to align to other sprites (for multi-sprites objects)
  • Automatically detects any existing x_offs and y_offs that the png sprite might have
  • Supports any sprite sizes (template based)
Sorry, Windows only (should work in Wine but didn't test it)

License: GPL v2 or later
Visual PNG interface
Visual PNG interface
Other notes:
* To change the work mode, select the template you want from the top right corner dropdown
* The "Detect" button above the offset positioning attempts to calculate the corrent offsets based on the sprites dimensions

* After cropping a sprite, the offsets it had will be lost

* The "Save sprites" button will save all active sprites with the defined offsets. To remove sprites after, just reselect the template from the dropdown menu.


Changelog:

Code: Select all

Version 0.2
      * Initial release
Version 0.3
      * Fixed the offset problem, now it's saved at the beginning of the PNG file (same as pngcodec)
      * Changed the default offsets a bit (based on graphics pack from the 32bpp mega pack v20081101)
      * Some other small fixes

Version 0.6
      * major backend rewrite
      * new interface with better sprite overview
      * "sprite list" shows all active sprites and associated offsets
      * sprites can now be added using drag & drop
      * replaced "fullzoom / normal" modes with template based modes
      * added CROP tool to remove empty space in sprites
      * now supports vista/7 aero effects (can be disabled in .cfg)
Attachments
visual_png_codec_v0.6.zip
Visual PNG v0.6 Binary
(1.47 MiB) Downloaded 436 times
visual_png_codec_source_v0.6.zip
Delphi 2010 source code for Visual PNG v0.6
(530.98 KiB) Downloaded 275 times
Last edited by coyoteelabs on 23 Feb 2010 22:15, edited 5 times in total.

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)
User avatar
cid.67
Engineer
Engineer
Posts: 23
Joined: 20 May 2009 12:03

Re: Visual PNG Codec

Post by cid.67 »

fantastic!!!
your program is really cool.the using is really easy and it works perfectly.
a great improvement for non accustomed.good work. :bow: :bow:
User avatar
northstar2
Engineer
Engineer
Posts: 111
Joined: 12 Aug 2008 18:31
Location: france

Re: Visual PNG Codec

Post by northstar2 »

i've tryed this program,the interface is very clear but i have a problem.after the coding of a sprite,it isn't placed correctly.
but if i open this sprite with sprite configurator,the offsets seem to be good??
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 991
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: Visual PNG Codec

Post by frosch »

northstar2: Maybe you find answer to that in
http://www.tt-forums.net/viewtopic.php?p=685290#p685290
and the following posts.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
User avatar
coyoteelabs
Engineer
Engineer
Posts: 27
Joined: 07 Aug 2006 09:52
Location: Romania

Re: Visual PNG Codec

Post by coyoteelabs »

Is there so little interest in this program?

I can't improve it without feedback.

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)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Visual PNG Codec

Post by planetmaker »

I think it's an awesome thing! Something like that is IMO even more dearly needed for the alignment of the traditional 8bpp sprites (as 32bpp can only replace existing graphics - or do I err?). Maybe you can extend it in that respect by adding the capability to read pcx, display them and give the offsets needed for proper adjustments. It'd be great, if those results then would be saved in a readable txt or csv file.
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: Visual PNG Codec

Post by AndersI »

planetmaker wrote:Something like that is IMO even more dearly needed for the alignment of the traditional 8bpp sprites
Such a tool is part of GRFMaker. Unfortunately, GRFMaker doesn't work directly on NFO files, so it's a bit tricky to use it for alignment in the general case.

In TTDPatch there's also a tool for checking/adjusting the alignment, but that is only a visual help, nothing is saved anywhere (you have to make notes of the offsets and modify your NFO manually afterwards).
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Visual PNG Codec

Post by DaleStan »

If you decode a GRF with grfcodec 0.9.5, you can use NFOEditor for that task. It's a crapshoot on it on anything other than the pristine output of grfcodec 0.9.5, though.
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
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: Visual PNG Codec

Post by AndersI »

planetmaker wrote:Something like that is IMO even more dearly needed for the alignment of the traditional 8bpp sprites
Done! You can find the first version of SpriteAligner here. All feedback appreciated.
User avatar
coyoteelabs
Engineer
Engineer
Posts: 27
Joined: 07 Aug 2006 09:52
Location: Romania

Re: Visual PNG Codec

Post by coyoteelabs »

Back with a major update to the program.

Code: Select all

  * major backend rewrite
  * new interface with better sprite overview
  * "sprite list" shows all active sprites and associated offsets
  * sprites can now be added using drag & drop
  * replaced "fullzoom / normal" modes with template based modes
  * added CROP tool to remove empty space in sprites
  * now supports vista/7 aero effects (can be disabled in .cfg)
See 1st post for download links

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)
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2897
Joined: 16 May 2007 16:59

Re: Visual PNG Codec

Post by Zephyris »

Would it be possible to have some kind of batch mode for .png cropping?
User avatar
coyoteelabs
Engineer
Engineer
Posts: 27
Joined: 07 Aug 2006 09:52
Location: Romania

Re: Visual PNG Codec

Post by coyoteelabs »

Zephyris wrote:Would it be possible to have some kind of batch mode for .png cropping?
I should be able to make one tomorrow.

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)
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2897
Joined: 16 May 2007 16:59

Re: Visual PNG Codec

Post by Zephyris »

Sweet :)
User avatar
coyoteelabs
Engineer
Engineer
Posts: 27
Joined: 07 Aug 2006 09:52
Location: Romania

Re: Visual PNG Codec

Post by coyoteelabs »

Done, see here

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

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 8 guests