HydrogenAudio

Misc. => Off-Topic => Topic started by: Jens Rex on 2004-05-28 00:26:57

Title: Another PNG optimization script
Post by: Jens Rex on 2004-05-28 00:26:57
Today I rewrote my old png optimization batch scripts to be a little more clever and user friendly.

My goal was to make a script that was easy for Joe Average to use. Joe Average doesn't want to wait 20 minutes for pngout to optimize a 1600*1200 truecolor screenshot, so I only used pngrewrite, pngcrush and advpng. You might be able to squeeze a few extra bytes out of the file with other tools, but it's generally not worth the hassle.

I intended to make a different version for people who want to optimize as much as possible regardless of speed, but then I thought, why not make a script that does it all.

So now I present this batch script with an --insane switch, that when invoked runs the mentioned programs plus pngout. If not invoked, it skips pngout.

Read the comments in the script, it needs a tiny bit of configuration. You can drag and drop any number of files(*) on the script, and it will even display progress in the title bar. You need to have everything in the same directory though (that includes the files you are optimizing).

This is for Windows 2000/XP/2003 only, since it uses some advanced scripting commands, only supported on newer versions of Windows.

Download the script and needed programs. Updated August 12, 2005. See below.

Disclaimer: I tested this a lot, and it should be bug free, but make sure you have a backup if you're running this on anything important.

The script does not support wildcards (*.png). Use of wildcards may result is loss of data. I'm fixing this soon. Also see above disclaimer. Fixed.

(*)It's seems Windows is not able to handle command lines exeeding a certain number of characters. So you are limited in the number files you can drop on the script. This limit depends on filename length of course, so there are no set rule about how many you can drop. I currently have no idea how to circumvent this. Nothing bad happens if you try dropping too many files. Windows just throws an error message, and the script doesn't run.

I've decided to put the script here in a codebox, since there still seems to be some interest in it. However, hunting down the required files is left as an exercise for the user, since I don't really want to keep the download package up to date any more.
Code: [Select]
@ECHO OFF
REM PNG.CMD version 06-11-2005-23:27 (MM-DD-YYYY-HH:MM)
REM Latest version available at:
REM [url=http://hydrogenaudio.org/forums/]http://hydrogenaudio.org/forums/[/url][QUESTION MARK]showtopic=22036
REM Created by JensRex (jens@jensrex.net). Feel free to modify
REM and redistribute as you wish. Credit is appreciated.
REM
REM ATTENTION!
REM Specify the complete path to your PNG directory below.
REM This directory must contain pngrewrite.exe, pngcrush.exe,
REM advpng.exe, pngout.exe, zlib.dll and this .cmd file.
REM
REM Example:
REM set pngdir="unconfigured"
REM This setting is case sensitive.

set pngdir="D:\PNG\"

REM No further editing is necessary below this line.

if not %pngdir%==unconfigured goto filecheck
echo.
echo PNG directory not configured. Open this file in a text editor for details.
goto exit
:filecheck
if not .%1==. goto init
echo.
echo Optimizes PNG files.
echo.
echo Usage: PNG.cmd (--insane) [file1] [file2] ...
echo --insane  (Optional) Enables extra PNG optimization (pngout.exe).
echo                      Extremely slow for big files, and generally not worth
echo                      the effort, unless you really need to push PNG to the
echo                      limit.
echo.
echo You can drag-and-drop any number of PNG files onto this file
echo to batch optimize them all. The title bar of the command window
echo will display progress information.
goto exit
:init
cd %pngdir%
set pngdir=%pngdir:"=%
%pngdir:~0,2%
REM TODO: Fix filecounting bug with --insane switch.
for %%i in (%*) do set /a totalfiles+=1
:start
set tempfile=
set tempfile=%random%
set /a numpng+=1
title Optimizing file %numpng% of %totalfiles%
if %1==--insane goto renameelse
if %1==*.png (
echo.
echo Wildcards are not supported.
set /a numpng-=1
goto shift1
)
if %~x1==.* (
echo.
echo Wildcards are not supported.
set /a numpng-=1
goto shift1
)
if not %~x1==.png (
echo.
echo ERROR: %1 is not a PNG file.
set /a numpng-=1
goto shift1
)
if not exist %1 (
echo.
echo ERROR: %1 does not exist.
set /a numpng-=1
goto shift1
)
if not "%~dp1"=="%pngdir%" (
echo.
echo ERROR: Input files must be located in same directory as PNG.CMD.
set /a numpng-=1
goto shift1
)
rename %1 %tempfile%.png
goto renameendif
:renameelse
if %2==*.png (
echo.
echo Wildcards are not supported.
set /a numpng-=1
goto shiftelse
)
if %~x2==.* (
echo.
echo Wildcards are not supported.
set /a numpng-=1
goto shiftelse
)
if not %~x2==.png (
echo.
echo ERROR: %2 is not a PNG file.
set /a numpng-=1
goto shiftelse
)
if not exist %2 (
echo.
echo ERROR: %2 does not exist.
set /a numpng-=1
goto shiftelse
)
if not "%~dp1"=="%pngdir%" (
echo.
echo ERROR: Input files must be located in same directory as PNG.CMD.
set /a numpng-=1
goto shiftelse
)
rename %2 %tempfile%.png
:renameendif
pngrewrite.exe %tempfile%.png %tempfile%_pal.png
copy %tempfile%_pal.png %tempfile%.png>nul
pngcrush.exe -brute -l 9 -rem alla %tempfile%.png %tempfile%_opt.png
if %1==--insane pngout.exe %tempfile%_opt.png
advpng.exe -z -4 %tempfile%_opt.png
if %1==--insane goto copyelse
copy %tempfile%_opt.png %1
rename %1 *.png
goto copyendif
:copyelse
copy %tempfile%_opt.png %2
rename %2 *.png
:copyendif
del %tempfile%_pal.png %tempfile%_opt.png %tempfile%.png
if %1==--insane goto shiftelse
:shift1
shift
if .%1==. goto close
goto shiftendif
:shiftelse
shift /2
if .%2 ==. goto close
:shiftendif
goto start
:close
title Optimization complete
echo.
echo PNG optimization complete. Optimized %numpng% files.
set pngdir=
set numpng=
set tempfile=
set totalfiles=
:exit
pause
title %ComSpec%
Title: Another PNG optimization script
Post by: Jens Rex on 2005-01-23 20:13:31
Due to the overwhelming feedback () I got from this script, I've decided to upload the latest version of the script, along with most recent versions of the needed executables to:

Removed: download link is in first post.
Title: Another PNG optimization script
Post by: smok3 on 2005-01-23 20:59:48
<unrelated> i need some sort of all2png converter, any recommendations? (have terabytes of tga, tiff anims rendered and they are waiting to get a lil smaller - almost all are 32 bit and i want to keep the alpha in pngs as well.)</unrelated>
Title: Another PNG optimization script
Post by: Jens Rex on 2005-01-23 21:06:49
Quote
<unrelated> i need some sort of all2png converter, any recommendations? (have terabytes of tga, tiff anims rendered and they are waiting to get a lil smaller - almost all are 32 bit and i want to keep the alpha in pngs as well.)</unrelated>
[a href="index.php?act=findpost&pid=267494"][{POST_SNAPBACK}][/a]

You should be able to find command line programs to do that. Usually a search for "[whatever]2PNG" should turn up something useful. Then you can write some simple batch script to automate the process.

I wrote batch scripts to do gif2png and bmp2png, but they're old and outdated, and I haven't bothered to write some new. When I get sufficiently bored, I might do that (like I did with the above script).
Title: Another PNG optimization script
Post by: ak on 2005-01-23 21:49:44
I heard ImageMagick could serve as whatever2png (whatever2whatever actually): http://www.imagemagick.org/ (http://www.imagemagick.org/)
Title: Another PNG optimization script
Post by: smok3 on 2005-01-23 21:56:25
tnx for the answers, meantime i figured xnview will probably do just fine
Title: Another PNG optimization script
Post by: Jens Rex on 2005-01-23 22:01:13
Updated script to use randomly named temporary files.
Title: Another PNG optimization script
Post by: Jens Rex on 2005-01-23 23:41:23
I made one script for converting various image types to PNG. It looks like this:

Code: [Select]
@echo off
:start

if /i %~x1==.tiff goto tiff
if /i %~x1==.tif goto tiff
if /i %~x1==.gif goto gif
if /i %~x1==.bmp goto bmp
goto unknown

:tiff
tiff2png.exe -compression 9 %1
call png.cmd %~n1.png
goto end

:gif
gif2png.exe -apt %1
call png.cmd %~n1.png
goto end

:bmp
bmp2png.exe -9 %1
call png.cmd %~n1.png
goto end

:unknown
echo The filetype %~x1 is not supported.
goto end

:end
shift
if .%1==. goto close
goto start

:close

Save it to a file called all2png.CMD, or whatever you want to call it. Then just drag and drop files onto it. Notice the source files has to be in the same directory as the script.

The script calls png.cmd, so you have to remove the pause command from the end of the png.cmd file, or the script will pause after every file it processes.

Get TIFF2PNG here (http://prdownloads.sourceforge.net/png-mng/tiff2png-0.91-win32.zip?download).
Get GIF2PNG here (http://www.r1ch.net/stuff/gif2png/gif2png.zip).
Get BMP2PNG here (http://hp.vector.co.jp/authors/VA010446/b2p-home/archives/b2p161w.zip).
Title: Another PNG optimization script
Post by: Jens Rex on 2005-01-24 13:05:38
Added safety checks to the script. It will now not try to process files that aren't .png files. It also checks if the file exists before trying to do anything. And finally, the script will now complain if the input files aren't in the same directory as png.cmd and the executables.

Progress indicator now displays "Optimizing file X of Y" instead of just "Optimizing file X".

Clarified help texts.

Updated download links in first post.
Title: Another PNG optimization script
Post by: Mr_Rabid_Teddybear on 2005-04-15 15:38:55
Hey, I really would want this.  I've used the earlier one, but the option to choose whether or not to use pngout would be tremendous.
However, I can't make it work... I've done as instructed, put all the files from png.rar in the same folder, and edited the png.cmd to point to the same folder. The only alteration I've done are changing
set pngdir=unconfigured
to
set pngdir="F:\My Documents\screenshots\PNG-Compression\"

When I try to run it, all the output I get are:
Quote
F:\My Documents\screenshots\PNG-Compression>png.cmd 215680296.png
Documents\screenshots\PNG-Compression\==F:\My was unexpected at this time.

Can't it cope with spaces in path, even when enclosing in quotation marks, or...?

Yes, this was really the problem, when changing to
set pngdir="F:\screenshots\PNG-Compression\"
it works....
Well, I just report anyhow...
Title: Another PNG optimization script
Post by: Mr_Rabid_Teddybear on 2005-04-15 17:48:03
Another intreresting  thing about this script is that it seems to work nice if you drag the file onto png.cmd or you run it in CMD with filename specified. Well, I also tried to run it with wildcard; png.cmd *.png... It ran, optimized the file, and then deleted it (and not to the recycle bin)! This was the concluding message it gave:
Quote
      458020      458020 100% 29908_opt.png (Bigger 667976(a3148h))
      458020      458020 100%
The file cannot be copied onto itself.
        0 file(s) copied.

PNG optimization complete. Optimized 1 files.

...and the file was gone.... OK. Best to keep backup anyway, I guess 
Otherwise this seems much more efficient than what I used before...
Title: Another PNG optimization script
Post by: Jens Rex on 2005-04-16 11:18:47
Quote
Can't it cope with spaces in path, even when enclosing in quotation marks, or...?[a href="index.php?act=findpost&pid=290768"][{POST_SNAPBACK}][/a]

That's odd. I believe I tested it with spaces in path. But it looks like there's a problem with it. I will take a look at it.

Wildcards are not supported. I should have written that somewhere. Sorry about that. I may look into adding support for wildcards later.
Title: Another PNG optimization script
Post by: Mr_Rabid_Teddybear on 2005-04-16 16:01:57
Quote
Wildcards are not supported. I should have written that somewhere. Sorry about that. I may look into adding support for wildcards later.
[a href="index.php?act=findpost&pid=291012"][{POST_SNAPBACK}][/a]

Well, I tested it out, so no important file was lost in the process
But wouldn't it be wise if the script refused to take wildcards at all as long as not supported (if that's possible to arrange), instead of described behaviour, so that some innocent soul doesn't one day inadvertently delete something that was really important for her/him....?
Title: Another PNG optimization script
Post by: Jens Rex on 2005-04-17 01:03:14
Quote
But wouldn't it be wise if the script refused to take wildcards at all as long as not supported...[a href="index.php?act=findpost&pid=291062"][{POST_SNAPBACK}][/a]

Yes, indeed it would. I will look into this very soon.
Title: Another PNG optimization script
Post by: Digga on 2005-05-24 08:49:20
Quote
Quote
But wouldn't it be wise if the script refused to take wildcards at all as long as not supported...
Yes, indeed it would. I will look into this very soon.
any news on this one?
also, is your download area down or removed? I can't acces the files anymore and get a 404 for http://jensrex.net/download (http://jensrex.net/download)
ta.
Title: Another PNG optimization script
Post by: Jens Rex on 2005-05-24 16:00:47
Whoops. Never trust me when I say I will do something soon .

I've found some ways to improve the compression level of the --insane switch quite a lot in some cases, due to the (retarded) way in which advpng does stuff. Basically, consider the --insane switch broken until further notice. The graceful failure of wildcards is also on the todo.

My server has been up and down a lot lately. I have another host (stable and on >1gb) where I will put download stuff. I need to work out some DNS issuses first.

I'll take a look at all this very soon .

Edit: By the way, the other day I tried to drag 79 files onto the script, and Windows threw me an error. It appears there's some limit on the length of supported command lines. Nothing I can do about that.
Title: Another PNG optimization script
Post by: Digga on 2005-05-24 16:34:32
Quote
Whoops. Never trust me when I say I will do something soon .
so what makes you think your senseless babbling will only slightly easy my mind on this topic, huh?! enough is enough, you poisoned the PNG world long enough my friend... or should I say fiend?! yeeehhs, I found you! you thought you could hide here at HA and I wouldn't find you? did you? ah well NOW the time has finaly come to...
uhm... to thank you I guess for your little script         

I'm looking forward to a new version 
Title: Another PNG optimization script
Post by: miniml on 2005-06-02 11:30:19
The download link is dead for me too. I can't wait for the new version (any version, because I didn't managed to download it when the server was up ) and new server.
Title: Another PNG optimization script
Post by: Jens Rex on 2005-06-03 22:55:18
Updated PNG script with the following changes.

Changed the order in which the programs are run. Advpng.exe is now run AFTER pngout.exe, because advpng.exe always writes PNG files with filter method 5, regardless of input filter type. Pngout.exe recompresses files with the same filter type as the input file. So that means that if pngcrush decided that filter method 1 was best for a given file, and advpng was able to optimize it further, it would be written with filter method 5. This is fine if pngout.exe isn't invoked, but if it is, pngout will try to optimize using filter method 5, which is not optimal. So this is why pngout.exe wasn't usually able to improve compression. After I discovered this behavior, I'm now a little happier with pngout, since it is very often able to achieve dramatic changes in file size. It is still slow as hell however.

The script should now fail gracefully when attemptning to use wildcards.

Fixed some issues with spaces in directory names.

Reworked sanity checking a little. End result is still the same, but it was giving improper error messages in some caes.

Added note that pngdir variable is case sensitive.

Download links are in first post.

Downloads are now hosted on a different server, and should now stay up unless a meteor his the Copenhagen data center. I'm going to shoot someone. Temporarily hosted on foobar2000.org, thanks Peter.

Edit: Forgot to mention that the download contains latest version of all programs as of today.
Title: Another PNG optimization script
Post by: Digga on 2005-06-04 05:47:28
thx for the update JensRex. works fine here, going to test it a little more.
Title: Another PNG optimization script
Post by: Mr_Rabid_Teddybear on 2005-06-10 19:51:33
This doesn't work at all here. I've added all files and a test.png to path F:\screenshots\PNGCompression and changed the line in png.cmd to
set pngdir="F:\screenshots\PNGCompression"
but all that happens is that it spits out the below posted messages in CMD. I repeat: png.cmd, all files and the png file are in same folder.

Code: [Select]

F:\screenshots\PNGCompression>png.cmd test.png

F:\screenshots\PNGCompression>rem @ECHO OFF

F:\screenshots\PNGCompression>REM PNG.CMD version 06-03-2005-22:38 (MM-DD-YYYY-H
H:MM)

F:\screenshots\PNGCompression>REM Latest version available at:

F:\screenshots\PNGCompression>REM [url=http://hydrogenaudio.org/forums/]http://hydrogenaudio.org/forums/[/url][QUESTION MARK
]showtopic=22036

F:\screenshots\PNGCompression>REM Created by JensRex (jens@jensrex.net). Feel fr
ee to modify

F:\screenshots\PNGCompression>REM and redistribute as you wish. Credit is apprec
iated.

F:\screenshots\PNGCompression>REM

F:\screenshots\PNGCompression>REM ATTENTION!

F:\screenshots\PNGCompression>REM Specify the complete path to your PNG director
y below.

F:\screenshots\PNGCompression>REM This directory must contain pngrewrite.exe, pn
gcrush.exe,

F:\screenshots\PNGCompression>REM advpng.exe, pngout.exe, zlib.dll and this .cmd
 file.

F:\screenshots\PNGCompression>REM

F:\screenshots\PNGCompression>REM Example:

F:\screenshots\PNGCompression>REM set pngdir="D:\My PNG Files\"

F:\screenshots\PNGCompression>REM This setting is case sensitive.

F:\screenshots\PNGCompression>set pngdir="F:\screenshots\PNGCompression"

F:\screenshots\PNGCompression>REM No further editing is necessary below this lin
e.

F:\screenshots\PNGCompression>if not "F:\screenshots\PNGCompression" == unconfig
ured goto filecheck

F:\screenshots\PNGCompression>if not .test.png == . goto init

F:\screenshots\PNGCompression>cd "F:\screenshots\PNGCompression"

F:\screenshots\PNGCompression>set pngdir=F:\screenshots\PNGCompression

F:\screenshots\PNGCompression>F:

F:\screenshots\PNGCompression>REM TODO: Fix filecounting bug with --insane switc
h.

F:\screenshots\PNGCompression>for %i in (test.png) do set /a totalfiles+=1

F:\screenshots\PNGCompression>set /a totalfiles+=1

F:\screenshots\PNGCompression>set tempfile=

F:\screenshots\PNGCompression>set tempfile=28569

F:\screenshots\PNGCompression>set /a numpng+=1

F:\screenshots\PNGCompression>title Optimizing file 1 of 1

F:\screenshots\PNGCompression>if test.png == --insane goto renameelse

F:\screenshots\PNGCompression>if .png == .* (
echo.
 echo Wildcards are not supported.
 set /a numpng-=1
 goto shift1
)

F:\screenshots\PNGCompression>if not .png == .png (
echo.
 echo ERROR: test.png is not a PNG file.
 set /a numpng-=1
 goto shift1
)

F:\screenshots\PNGCompression>if not exist test.png (
echo.
 echo ERROR: test.png does not exist.
 set /a numpng-=1
 goto shift1
)

F:\screenshots\PNGCompression>if not "F:\screenshots\PNGCompression\" == "F:\scr
eenshots\PNGCompression" (
echo.
 echo ERROR: Input files must be located in same directory as PNG.CMD.
 set /a numpng-=1
 goto shift1
)

ERROR: Input files must be located in same directory as PNG.CMD.

F:\screenshots\PNGCompression>shift

F:\screenshots\PNGCompression>if . == . goto close

F:\screenshots\PNGCompression>title Optimization complete

F:\screenshots\PNGCompression>echo.


F:\screenshots\PNGCompression>echo PNG optimization complete. Optimized 0 files.

PNG optimization complete. Optimized 0 files.

F:\screenshots\PNGCompression>set pngdir=

F:\screenshots\PNGCompression>set numpng=

F:\screenshots\PNGCompression>set tempfile=

F:\screenshots\PNGCompression>set totalfiles=

F:\screenshots\PNGCompression>pause
Press any key to continue . . .

F:\screenshots\PNGCompression>title C:\WINDOWS\system32\cmd.exe

F:\screenshots\PNGCompression>
Title: Another PNG optimization script
Post by: Gambit on 2005-06-10 20:15:10
Quote
This doesn't work at all here. I've added all files and a test.png to path F:\screenshots\PNGCompression and changed the line in png.cmd to
set pngdir="F:\screenshots\PNGCompression"
but all that happens is that it spits out the below posted messages in CMD. I repeat: png.cmd, all files and the png file are in same folder.
[a href="index.php?act=findpost&pid=305146"][{POST_SNAPBACK}][/a]


You are missing a backslash:
set pngdir="F:\screenshots\PNGCompression\"
Title: Another PNG optimization script
Post by: Mr_Rabid_Teddybear on 2005-06-10 21:24:56
Quote
You are missing a backslash:
set pngdir="F:\screenshots\PNGCompression\"
[a href="index.php?act=findpost&pid=305150"][{POST_SNAPBACK}][/a]

You're right! Thanks! 
Title: Another PNG optimization script
Post by: Digga on 2005-06-10 21:41:11
I played around with the script a bit more, the --insane switch works perfectly here (though only saves ~0,3KB with my testfile):
original: 32,2 KB
normal: 15,7 KB
insane: 15,4 KB

as a sidenote, am I right in guessing that a big part of the compression is reached in reducing the colors?
Title: Another PNG optimization script
Post by: Mr_Rabid_Teddybear on 2005-06-11 05:48:42
Hmmm... Tested, just for the hell of it: You are still allowed to permanently delete your files by running png.cmd *.png
Title: Another PNG optimization script
Post by: Jens Rex on 2005-06-11 21:32:51
I forgot to remove "REM" from the first line of the script. Change the first line to:

@ECHO OFF

That way the script doesn't echo the commands, and the output is much more clean.
Title: Another PNG optimization script
Post by: Jens Rex on 2005-06-11 21:36:13
Quote
I played around with the script a bit more, the --insane switch works perfectly here (though only saves ~0,3KB with my testfile):
original: 32,2 KB
normal: 15,7 KB
insane: 15,4 KB
[a href="index.php?act=findpost&pid=305170"][{POST_SNAPBACK}][/a]

The benefits of running pngout.exe varies wildly. Some times it compresses a lot better, and some times there is hardly any benefit.

Quote
as a sidenote, am I right in guessing that a big part of the compression is reached in reducing the colors?
[a href="index.php?act=findpost&pid=305170"][{POST_SNAPBACK}][/a]

If an image containing fewer than 256 colors is saved as a 24 bit PNG, pngrewrite will convert it to an 8-bit image, and this saves a vary large amount of space.
Title: Another PNG optimization script
Post by: Jens Rex on 2005-06-11 21:50:07
Quote
Hmmm... Tested, just for the hell of it: You are still allowed to permanently delete your files by running png.cmd *.png
[a href="index.php?act=findpost&pid=305235"][{POST_SNAPBACK}][/a]

Hmm... you're right.

I just looked into it. Turns out it isn't as easy as I thought. I'm working on it right now.
Title: Another PNG optimization script
Post by: Jens Rex on 2005-06-11 22:51:04
I sort of fixed it now, but not as I would have liked. It's sort of hack-ish.

It turns out I have reached the limits of batch scripting. Advanced string comparison isn't possible.

I would like to have checked for presence of "*" in the command line arguments, but it seems you can't really do that.

There are two ways I'm checking for wildcards now. If you type <filename>.* I catch that, and if you type *.png I catch that too. But not *.gif for example.

The reason for that is that Windows expands %~n1 to an actual filename. So %~n1 would return the first matching filename, which means if I check that string for *, the comparison is always false. However is does not expand %~x1, so checking for * works here.

To take this script further, I should rewrite it in VBScript, but I'm not sure I'm going to do that. I think it works good enough as it is. I never imagined when I started that this script would end up as a 151 line monster, just to run a few EXE files.

I updated the download link in the first post.
Title: Another PNG optimization script
Post by: nooby_god on 2005-08-11 15:27:47
Quote
I sort of fixed it now, but not as I would have liked. It's sort of hack-ish.

It turns out I have reached the limits of batch scripting. Advanced string comparison isn't possible.

I would like to have checked for presence of "*" in the command line arguments, but it seems you can't really do that.

There are two ways I'm checking for wildcards now. If you type <filename>.* I catch that, and if you type *.png I catch that too. But not *.gif for example.

The reason for that is that Windows expands %~n1 to an actual filename. So %~n1 would return the first matching filename, which means if I check that string for *, the comparison is always false. However is does not expand %~x1, so checking for * works here.

To take this script further, I should rewrite it in VBScript, but I'm not sure I'm going to do that. I think it works good enough as it is. I never imagined when I started that this script would end up as a 151 line monster, just to run a few EXE files.

I updated the download link in the first post.
[a href="index.php?act=findpost&pid=305393"][{POST_SNAPBACK}][/a]


I get a 404 error when trying to download the script.
Title: Another PNG optimization script
Post by: Digga on 2005-08-11 16:28:12
Quote
I get a 404 error when trying to download the script.


Link removed. See first post. --JensRex
Title: Another PNG optimization script
Post by: tinyvillager on 2005-08-11 16:42:02
I'm getting " Input files must be located in same directory as PNG.CMD"

In which i did but still getting message.
I'm dragging images onto png.cmd btw.
Title: Another PNG optimization script
Post by: Digga on 2005-08-11 16:46:02
Quote
I'm getting " Input files must be located in same directory as PNG.CMD"
In which i did but still getting message.
I'm dragging images onto png.cmd btw.
have you set the path in the .cmd file (renaming it to .txt)? remember it's case sensitive.

[span style='font-size:8pt;line-height:100%']edit: either the posts where moved or I need some sleep. probably both.[/span]
Title: Another PNG optimization script
Post by: Jens Rex on 2005-08-12 09:02:18
I was cleaning up my webspace yesterday (what a mess), and I must have deleted the file by mistake. I'll upload it again at once.

EDIT: Uploaded. Contains most recent version of pngout.exe.
Title: Another PNG optimization script
Post by: AlexanderTG on 2006-04-26 16:00:35
Is this program still available?  I would like to compress some files!
Title: Another PNG optimization script
Post by: Digga on 2006-04-26 19:11:52
Is this program still available?  I would like to compress some files!
you could still use the version linked in post #31.
Title: Another PNG optimization script
Post by: kokotas on 2008-05-15 11:49:54
thanks a bunch for this ^^
may i ask how do i use the insane switch?

edit: ok, i found how to do it... running 'cmd.exe --insane filename'.
but isnt there a way to use it with the dragndrop method? To be permantly turned on?

edit2: ok nvm, I didnt notice Im two years late
Title: Another PNG optimization script
Post by: Conrado on 2010-01-06 13:10:00
I know that I'm bumping quite old thread, but could anyone compile pngrewrite, advpng and pngcrush with latest ICL and put on... well, it's not audio related, but rarewares was the place for such custom compilations.