avo has asked for the wisdom of the Perl Monks concerning the following question:
my @allpixels = split( /,/ , $pixellist ); my @rgbvals; foreach my $pixel (@allpixels) { push @rgbvals, ($pixel >> 16 & 255, $pixel >> 8 & 255, $pixel & 255) +; } my $newblob = pack "C*", @rgbvals;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to optimize this code
by moritz (Cardinal) on Sep 10, 2008 at 17:09 UTC | |
|
Re: How to optimize this code
by Fletch (Bishop) on Sep 10, 2008 at 17:15 UTC | |
|
Re: How to optimize this code
by jwkrahn (Abbot) on Sep 10, 2008 at 21:04 UTC | |
|
Re: How to optimize this code
by betterworld (Curate) on Sep 10, 2008 at 19:44 UTC |