Thread *.BMP auslesen (24 answers)
Opened by willi at 2010-02-13 20:33

Gast willi
 2010-02-13 23:55
#132927 #132927
Also das Bild ist zu 100% OK
Habe es einmal mit gimp gemalt "rote farbe ausgeschüttet"
und einmal mit MSPaint "rote farbe ausgeschüttet"

beidemale das selbe ergebnis


Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl

use strict;
use warnings;
use FindBin qw/$Bin/;
use Benchmark (qw/timediff timestr/);
use Image::BMP;

my $t0 = Benchmark->new();

my $img = Image::BMP->new();
$img->debug( 1 );
$img->open_file($Bin . '/red.bmp');
my ($r,$g,$b) = $img->xy_rgb(10,10);

my $t1 = Benchmark->new();
my $td = timediff($t1, $t0);
print "the code took:", timestr($td),"\n";


Quote
BMP: /root/red.bmp
Image: 8/256 colors. Geometry: 240x320 76800 [comp: 0]
Reading image data - [240 x 320 x 8]...
the code took:74 wallclock secs (72.40 usr + 1.68 sys = 74.08 CPU)


noch jemand eine Idee?

View full thread *.BMP auslesen