comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Creating an image as a sum of images
items: Re: Creating an image as a sum of images

Creating an image as a sum of images
type: item
description: Hello; I am new to IDL and am having a problem figuring out how to accomplish an easy task. I have 8 images (png) that are 128x128. I would like to create one large image that is composed of four images in two rows with some sort of whitespace in between. Thats it. Any help at all would be greatly appreciated. Thanks FSD
creator: FSD
date: 2005-02-03T19:33:55-00:00

Re: Creating an image as a sum of images
type: item
description: FSD writes: > Hey, thanks for the input. It sorta works but how do I read in eight > files and write them back out again with the window? I have several > thousand files and I need to run it seemslessly in the background. Well, clearly you are going to have to do it in a loop. :-) You can gather all the files in a directory with File_Search, figure out how many there are (keyword to File_Search), and loop through them 8 at a time. I would display them differently though. I would display 8 files like this: !P.Multi=[0,4,2] LoadCT, 0, /Silent Device, Decomposed=0 Erase, Color=255 FOR j=0,7 DO BEGIN ; read the image file and get the image on this line TVImage, image ENDFOR !P.Multi = 0 Cheers, David -- David Fanning, Ph.D. Fanning Software Consulting, Inc. Coyote's Guide to IDL Programming: http://www.dfanning.com/
creator: David Fanning
date: 2005-02-03T20:59:38-00:00

Re: Creating an image as a sum of images
type: item
description: In article <fhu40117oo2oat2gg4oi0tvm1bml66r2m1@4ax.com>, FSD <frank@digennaro-dot-com> wrote: > I am new to IDL and am having a problem figuring out how to > accomplish an easy task. I have 8 images (png) that are 128x128. > I would like to create one large image that is composed of four images > in two rows with some sort of whitespace in between. Thats it. Any > help at all would be greatly appreciated. Something like this, I think, ... file = ['png1', 'png2', ...] image = BYTARR(3, 4*128, 2*128) FOR j = 1, 0, -1 DO BEGIN FOR i = 0, 3 DO BEGIN ifile = i + j*4 png = READ_PNG(file[ifile]) image[*, i*128, j*128] = png ENDFOR ENDFOR Add whitespace as needed ... Cheers, Ken
creator: K. Bowman
date: 2005-02-03T22:45:14-00:00

Re: Creating an image as a sum of images
type: item
description: "David Fanning" <davidf@dfanning.com> wrote in message news:MPG.1c6c3ea4c718278989901@news.frii.com... > FSD writes: > >> Hey, thanks for the input. It sorta works but how do I read in eight >> files and write them back out again with the window? I have several >> thousand files and I need to run it seemslessly in the background. > > Well, clearly you are going to have to do it in a loop. :-) >> !P.Multi=[0,4,2] > FOR j=0,7 DO BEGIN > ; read the image file and get the image on this line > TVImage, image > ENDFOR ahem, well, yes indeed, loops are good. Unless you have the 1998 version of tvimage, which doesn't quite work with p.multi :O -bob "Lets just say" [TM] I really should update some of those older routines ;)
creator: R.G.Stockwell
date: 2005-02-03T22:48:31-00:00

Re: Creating an image as a sum of images
type: item
description: R.G.Stockwell writes: > ahem, well, yes indeed, loops are good. > Unless you have the 1998 version of tvimage, which doesn't quite work with > p.multi :O Uh, time marches on... :-) Cheers, David -- David Fanning, Ph.D. Fanning Software Consulting, Inc. Coyote's Guide to IDL Programming: http://www.dfanning.com/
creator: David Fanning
date: 2005-02-03T23:03:25-00:00