Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

Re: array into tiff format

  • To: mathgroup at
  • Subject: [mg32961] Re: array into tiff format
  • From: Jens-Peer Kuska <kuska at>
  • Date: Fri, 22 Feb 2002 01:48:42 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <a526d4$25l$>
  • Reply-to: kuska at
  • Sender: owner-wri-mathgroup at


make the data:

tab = Table[Sin[x*y], {y, -Pi, Pi, 2Pi/128}, {x, -Pi, Pi, 2Pi/128}];

make the Graphics[] object

{maxPix, minPix} = {Max[#], Min[#]} &[Flatten[tab]];
bitmap = Graphics[Raster[
        Map[Round[255*(# - minPix)/(maxPix - minPix)] &, tab, {2}], {{0,
          Reverse[Dimensions[tab]]}, {0, 255}, ColorFunction ->

and save it

Export["test.tif", bitmap, ExportRaster -> True]


Thorsten Matthias wrote:
> Hi
> I have an array of pixels where the value shall be related to the gray
> level. How can I convert this data to the tiff-format?
> Thanks,
> Thorsten

  • Prev by Date: Re: Integrating over a Minimum
  • Next by Date: World map
  • Previous by thread: array into tiff format
  • Next by thread: Integrating over a Minimum