Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Exporting Density Plots -- one pixel per point?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg64362] Re: [mg64344] Exporting Density Plots -- one pixel per point?
  • From: "Maarten van der Burgt" <maarten.vanderburgt at icos.be>
  • Date: Tue, 14 Feb 2006 01:31:38 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hallo,

The following results in a gray scale TIFF file which is exactly
3000 x 3000 pixels.
The Export to the hard disk takes 0.7 sec on a Pentium M, 1.6 GHz, 500 Mb
portable PC with Mathematica 5.0 and Windows XP.

Hope this helps,

Maarten

w=3000;
h=3000;

dat = Table[Random[Integer, {0,255}],{h},{w}];

gr =Show[Graphics[Raster[dat,{{0,0},{w,h}},{0,255}]],
    PlotRange\[Rule]{{1,w},{1,h}},ImageSize\[Rule]{w,h},
    AspectRatio\[Rule]Automatic,DisplayFunction\[Rule]Identity]

Timing[Export[CurDir[]<>"image.tif", gr, "Tiff"]]




                                                                                                                                                   
                    "quintessentialk"                                                                                                              
                    <quintessentialk@        To:     mathgroup at smc.vnet.net                                                                        
                    gmail.com>               cc:                                                                                                   
                                             Subject: [mg64362]     [mg64344] Exporting Density Plots -- one pixel per point?                                
                    13/02/2006 09:15                                                                                                               
                                                                                                                                                   
                                                                                                                                                   




Hello,

I wish to generate large bitmaps (tiffs, say) where each the greyscale
color value of each pixel is determined by a given function of x and y.
By large, I mean more than 9E6 pixels.

I've tried using a density plot for this, and then a rasterized table,
but I run into a couple of difficulties. First, if I use pixel counts
which approach this order of magnitude, I get memory errors -- on a
win32 machine with 2GB installed. Second, if I make do with a smaller
pixel count, I have trouble exporting the plot in a truly
one-pixel-per-data-point fashion. (The process is time consuming, and
results are unconvincing).

I think the problem is the way Mathematica internally tries do
everything in a resolution independent way, which I don't want here.

Ideas?
Questions?

(The specific application is to generate high resolution print-outs of
holographic patterns which can later be imaged to photographic film.
After appropriate development and bleaching, the exposed film can be
used as a transmission hologram to couple gaussian laser beams into
other interesting modes.)

Thank you.






  • Prev by Date: Re: Exporting Density Plots -- one pixel per point?
  • Next by Date: Re: Re: Comparison of Mathematica on Various Computers
  • Previous by thread: Re: Exporting Density Plots -- one pixel per point?
  • Next by thread: Solve or Reduce?