projects
/
Printer-EVOLIS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c53cd7
)
added padding to end of bitmap download
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 15 Aug 2010 13:40:38 +0000
(15:40 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 15 Aug 2010 13:40:38 +0000
(15:40 +0200)
ghostscript sometimes produce smaller pbm files due to rounding
errors from points to pixels and back
scripts/evolis-driver.pl
patch
|
blob
|
history
diff --git
a/scripts/evolis-driver.pl
b/scripts/evolis-driver.pl
index
ed04e61
..
2001917
100755
(executable)
--- a/
scripts/evolis-driver.pl
+++ b/
scripts/evolis-driver.pl
@@
-54,5
+54,9
@@
sub read_pbm {
local $/ = undef;
my $data = <$pbm>;
warn "# $path $size ", length($data), " bytes\n";
+ if ( my $padding = ( 648 * 1016 / 8 - length($data) ) ) {
+ warn "# adding $padding zero bytes padding\n";
+ $data .= "\x00" x $padding;
+ }
return $data;
}