ha! this is happening with increasing frequency -- I ask a question, and then, I find the answer myself. I *must* be getting better at PDL. Read on...
On Sun, Aug 29, 2010 at 10:43 AM, P Kishor <[email protected]> wrote: > Am enjoying PDL::IO::Pic tremendously. Something like the following is > great fun -- > > pdl> $a = ones(500,500)->random > pdl> wpic $a, 'foo.tif' > > voila! I have cool looking foo.tif with random noise. Here's the thing > though -- each value of $a has been written to each pixel. Is there > someway I can either specify the image size , or request that each > value be written to x*y pixels? So that, if I want each value of $a to > be written to 10x10 pixels, the resulting image will be 5000 x 5000 > with 10x10 rects of solid color representing each value in $a. On the > other hand, if I specify image size to be 1000 x 1000, each value in > $a will be applied to 2x2 blocks of pixels. > Easy. Just use one of the resampling methods provided by Matt Kenworthy, Craig DeForest, or Chris Marshall [1] (in response to a question from me!) Sweet. [1] https://sourceforge.net/apps/mediawiki/pdl/index.php?title=Resampling_up_a_piddle > I realize, some error catching would be required to ensure the size of > the image is not smaller than the size of $a, but one step at a time. > > Suggestions? > > -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu ----------------------------------------------------------------------- Assertions are politics; backing up assertions with evidence is science ======================================================================= _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
