Skip to content

Commit

Permalink
Speed up image fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Oct 8, 2018
1 parent 81fbde1 commit 70d2e6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mailboxes/detach.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ if ($in{'scale'}) {
($jpegin, $jpegout) = &pipeopen("pnmscale $scale 2>/dev/null | cjpeg");
print $jpegin $type;
print $jpegin $size;
while(read($pnmout, $buf, 1024)) {
while(read($pnmout, $buf, 32768)) {
print $jpegin $buf;
}
close($jpegin);
close($pnmout);
print "Content-type: image/jpeg\n\n";
while(read($jpegout, $buf, 1024)) {
while(read($jpegout, $buf, 32768)) {
print $buf;
}
close($jpegout);
Expand Down

0 comments on commit 70d2e6f

Please sign in to comment.