Mac OS X で OptiPNG のインストール
optipng のインストールを tar ボールで行おうとするとエラーが発生する。 # cd /path/to/optipng-0.7.5 ./configure make make test … osys.c:525:25: error: no member named ‘st_atim’ in ‘struct stat’ times[0] = sbuf.st_atim; ~~~~ ^ osys.c:526:25: error: no member named ‘st_mtim’ in ‘struct stat’ times[1] = sbuf.st_mtim; ~~~~ ^ osys.c:527:13: warning: implicit declaration of function ‘utimensat’ is invalid in C99 [-Wimplicit-function-declaration] … なので、brew で行う(Homebrew と Xcode のインストールは割愛)。 # brew update brew install optipng 後は # optipng [最適化したいPNGをドラッグ&ドロップ] で最適化されるが、 https://developers.google.com/speed/pagespeed/insights/?hl=ja でスピードテストしても、最適化した PNG ファイルはもっと圧縮できる旨が知らされる模様。 さらに Photoshop CC 2014 で減色しても無理。HTTPD の Expires をオフにしても無意味。 その上、画像をおいてある CentOS 6....