hethomas wrote:
> I know similar things have been posted before with regard to Tiff
> files, but I really need Jpegs. The closest I can get is for a grey
> scale (presumably one band) jpeg to be output. Most things I try
> produce a jpeg file, which won't display (except in ENVI).
> Any ideas?
> Here is my code:
>
> envi_doit, 'decor_doit',fid=t_fid,
> pos=pos,dims=dims,out_name=out_name,r_fid=rfid,$
> out_bname=['Band 14','Band 13','Band 10']
>
> cd, RGBfolder
>
> envi_file_query, rfid, ns=ns, nl=nl, nb=nb
> dims = [-1l, 0, ns-1, 0, nl-1]
> pos = lindgen(nb)
> out_namethree = 'RGB-'+filename
>
>
> envi_doit, 'stretch_doit', $
> fid=rfid, pos=pos, dims=dims, $
> method=1, out_name=out_namethree, $
> i_min=2.0, i_max=98.0, range_by=0, $
> out_min=0, out_max=255, out_dt=1, $
> r_fid=sfid
>
> envi_output_to_external_format, fid=sfid, dims=dims, pos=pos, $
> out_name='outputfile.jpg', /JP2
>
> Thanks in advance!
>
> Helen
Hi Helen,
for this task, I use the following command, in IDL:
write_image, outputFileName, 'JPEG', data,(header.lookup)[0,*],$
(header.lookup)[1,*], (header.lookup)[2,*], quality = 100, order = 1
You can get access to the lookup table from an existing file via
envi_file_query... or just pass your own RGB triplet (R then G then B)
Jean
|