MathGroup Archive 2002

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

Search the Archive

Re: array into tiff format


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