Update gallery

parent 3d6a62cb
......@@ -40,14 +40,14 @@ for($i = 1; $i < $argc; ++$i) {
$ofile = __DIR__.'/static/g/'.$date.'.bpg';
if(file_exists($ofile) && filemtime($ofile) >= filemtime($sfile)) continue;
passthru('bpgenc -q 29 -m 8 -o '.escapeshellarg($tfile = '/tmp/'.$date.'.bpg').' '.escapeshellarg($sfile), $ret);
passthru('bpgenc -q 29 -m 9 -o '.escapeshellarg($tfile = '/tmp/'.$date.'.bpg').' '.escapeshellarg($sfile), $ret);
if($ret !== 0) fatal("bpgenc failure");
rename($tfile, $ofile);
/* XXX: requires fiddling with sharpening */
passthru('convert '.escapeshellarg($sfile).' -filter Lanczos -resize x200 -unsharp 1.5x1+0.7+0.02 '.escapeshellarg($tfile = '/tmp/'.$date.'.png'), $ret);
if($ret !== 0) fatal("convert failure");
passthru('bpgenc -q 29 -m 8 -o '.escapeshellarg($tbfile = '/tmp/'.$date.'.bpg').' '.escapeshellarg($tfile), $ret);
passthru('bpgenc -q 29 -m 9 -o '.escapeshellarg($tbfile = '/tmp/'.$date.'.bpg').' '.escapeshellarg($tfile), $ret);
if($ret !== 0) fatal("bpgenc failure");
rename($tbfile, __DIR__.'/static/g/'.$date.'-thumb.bpg');
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment