Permalink
Browse files
reading files from testfolder
- Loading branch information...
Showing
with
17 additions
and
17 deletions.
-
+17
−17
modules/printengine.pl
|
@@ -203,28 +203,28 @@ |
|
|
; |
|
|
die "unknown display software in configuration!\n"; |
|
|
} |
|
|
######testcode framebuffer access |
|
|
my $fb = Graphics::Framebuffer->new( FB_DEVICE=>$display_device, SPLASH=>0 ); |
|
|
$fb->clear_screen('OFF'); |
|
|
$fb->blit_write( |
|
|
$fb->load_image( |
|
|
{ |
|
|
#read filelist from testfolder |
|
|
my $dir = '/tmp/tst'; |
|
|
|
|
|
'center' => $fb->{'CENTER_XY'}, |
|
|
# Three centering options are available |
|
|
# CENTER_X = center horizontally |
|
|
# CENTER_Y = center vertically |
|
|
# CENTER_XY = center horizontally and |
|
|
# vertically. Placing it |
|
|
# right in the middle of |
|
|
# the screen. |
|
|
opendir(DIR, $dir) or die $!; |
|
|
|
|
|
'file' => 'test1.png', # Usually needs full path |
|
|
my @pics |
|
|
= grep { |
|
|
m/\.png$/ # png files only |
|
|
&& -f "$dir/$_" # and is a file |
|
|
} readdir(DIR); |
|
|
closedir(DIR); |
|
|
#builtin framebuffer access |
|
|
|
|
|
my $fb = Graphics::Framebuffer->new( FB_DEVICE=>$display_device, SPLASH=>0 ); |
|
|
#$fb->clear_screen('OFF'); |
|
|
$fb->blit_write( |
|
|
$fb->load_image( |
|
|
{ 'center' => $fb->{'CENTER_XY'}, |
|
|
'file' => '$pics[0]', # Usually needs full path |
|
|
} |
|
|
) |
|
|
); |
|
|
sleep 3; |
|
|
$fb->clear_screen('OFF'); |
|
|
#$fb->clear_screen('ON'); |
|
|
|
|
|
|
0 comments on commit
be56a19