Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: PDL examples?

by fglock (Vicar)
on Aug 26, 2002 at 16:01 UTC ( [id://192915]=note: print w/replies, xml ) Need Help??


in reply to PDL examples?

this is a simple "rescale to 256x256" program. (there are too many "use" statements here - this was cut from a larger program).

#! /bin/perl use PDL; use PDL::FFT; use PDL::IO::Pic; use PDL::Image2D; use PDL::ImageRGB; use PDL::ImageND; use PDL::Primitive; use PDL::Slices; $real = PDL->rpic('image.pgm'); # read image $display = zeroes(256,256); # new empty image PDL::rescale2d($real, $display); # scale into empty image $display->wpic("test.tif"); # done

update:Zaxo: PDL::IO::Pic takes care of image headers, compression, etc. for you.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://192915]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-10-06 23:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (43 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.