Skip to content

Commit

Permalink
fiddle with png.p6
Browse files Browse the repository at this point in the history
  • Loading branch information
cygx committed Feb 9, 2019
1 parent 2fd2684 commit 676fc1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -12,7 +12,7 @@ t-%: t/%-*.t
$(PERL6) $<

png:
$(PERL6) png.p6 examples/*.txt
$(PERL6) examples/png.p6 examples/*.txt
@$(CHMOD-X) examples/*.png

clean:
Expand Down
7 changes: 6 additions & 1 deletion png.p6 → examples/png.p6
Expand Up @@ -6,6 +6,11 @@ for rgba::text.readall($*ARGFILES) {
my $src = $*ARGFILES.path;
my $dest = $name ?? $src.sibling("$name\.png") !! $src.extension('png');

note "$src ->> $dest";
my $ss = ($src.s / 1000).round(0.01);
$*ERR.print: "$src ->> {$dest.basename} {$ss}k ->> ?";

spurt $dest, .&to-png;

my $ds = ($dest.s / 1000).round(0.01);
$*ERR.print: "\b{$ds}k\n";
}

0 comments on commit 676fc1e

Please sign in to comment.