"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "t/113_save_pdf_with_downsample.t" between
gscan2pdf-2.11.1.tar.xz and gscan2pdf-2.11.2.tar.xz

About: gscan2pdf is a GUI to produce PDFs from scanned documents (using Perl).

113_save_pdf_with_downsample.t  (gscan2pdf-2.11.1.tar.xz):113_save_pdf_with_downsample.t  (gscan2pdf-2.11.2.tar.xz)
skipping to change at line 21 skipping to change at line 21
######################### #########################
Gscan2pdf::Translation::set_domain('gscan2pdf'); Gscan2pdf::Translation::set_domain('gscan2pdf');
use Log::Log4perl qw(:easy); use Log::Log4perl qw(:easy);
Log::Log4perl->easy_init($ERROR); Log::Log4perl->easy_init($ERROR);
my $logger = Log::Log4perl::get_logger; my $logger = Log::Log4perl::get_logger;
Gscan2pdf::Document->setup($logger); Gscan2pdf::Document->setup($logger);
# Create test image # Create test image
system( qw(convert +matte -depth 1 -colorspace Gray -pointsize 12 -density 300), system( qw(convert +matte -depth 1 -colorspace Gray), '-family', 'DejaVu Sans', qw(-pointsize 12 -density 300),
'label:The quick brown fox', 'test.png' ); 'label:The quick brown fox', 'test.png' );
my $slist = Gscan2pdf::Document->new; my $slist = Gscan2pdf::Document->new;
# dir for temporary files # dir for temporary files
my $dir = File::Temp->newdir; my $dir = File::Temp->newdir;
$slist->set_dir($dir); $slist->set_dir($dir);
$slist->import_files( $slist->import_files(
paths => ['test.png'], paths => ['test.png'],
skipping to change at line 57 skipping to change at line 57
); );
} }
); );
Gtk3->main; Gtk3->main;
is( -s 'test.pdf' > -s 'test2.pdf', 1, is( -s 'test.pdf' > -s 'test2.pdf', 1,
'downsampled PDF smaller than original' ); 'downsampled PDF smaller than original' );
system(qw(pdfimages test2.pdf x)); system(qw(pdfimages test2.pdf x));
like( like(
capture( qw(identify -format), '%m %G %g %z-bit %r', 'x-000.pbm' ), capture( qw(identify -format), '%m %G %g %z-bit %r', 'x-000.pbm' ),
qr/PBM 2\d\dx2\d 2\d\dx2\d[+]0[+]0 1-bit DirectClass Gray/, qr/PBM 2\d\dx[23]\d 2\d\dx[23]\d[+]0[+]0 1-bit DirectClass Gray/,
'downsampled' 'downsampled'
); );
######################### #########################
unlink 'test.png', 'test.pdf', 'test2.pdf', 'x-000.pbm'; unlink 'test.png', 'test.pdf', 'test2.pdf', 'x-000.pbm';
Gscan2pdf::Document->quit(); Gscan2pdf::Document->quit();
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)