comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: reading in images
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: reading in images [message #54019] Mon, 14 May 2007 08:26
grubab is currently offline  grubab
Messages: 2
Registered: May 2007
Junior Member
On May 14, 3:48 pm, David Fanning <d...@dfanning.com> wrote:
> Ingo von Borstel writes:
>> newimage = dblarr(xsize,ysize)
>> newimage[(xsize-imageSize[0])/2:(xsize-imageSize[0])/2+image Size[0],(ysize-imageSize[1])/2:(ysize-imageSize[1])/2+imageS ize[1]]
>> = image
>> tv, newimage
>>> end
>
>> Create a new image that is the size of your window. Place the old image
>> within the centre of the newly created image and then display it. I hope
>> I didn't do any mistake within the implementation above; you might need
>> to adjust the indices slightly, I haven't tested it.
>
> Oh, for heaven's sake. Download TVIMAGE and use that.
>
> http://www.dfanning.com/programs/tvimage.pro
>
> Then,
>
> IDL> TVImage, image
>
> It will be big enough for you to see it. :-)
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/

thanks alot, i already found your tvimage program.
Re: reading in images [message #54020 is a reply to message #54019] Mon, 14 May 2007 06:48 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ingo von Borstel writes:

> newimage = dblarr(xsize,ysize)
> newimage[(xsize-imageSize[0])/2:(xsize-imageSize[0])/2+image Size[0],(ysize-imageSize[1])/2:(ysize-imageSize[1])/2+imageS ize[1]]
> = image
> tv, newimage
>> end
>
> Create a new image that is the size of your window. Place the old image
> within the centre of the newly created image and then display it. I hope
> I didn't do any mistake within the implementation above; you might need
> to adjust the indices slightly, I haven't tested it.

Oh, for heaven's sake. Download TVIMAGE and use that.

http://www.dfanning.com/programs/tvimage.pro

Then,

IDL> TVImage, image

It will be big enough for you to see it. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: reading in images [message #54024 is a reply to message #54020] Mon, 14 May 2007 03:41 Go to previous message
Ingo von Borstel is currently offline  Ingo von Borstel
Messages: 54
Registered: September 2006
Member
Hi,
>
> pro image
> device, decomposed=0
> imageSize = [137,103]
> read_jpeg, 'images.jpeg', image
> loadct, 0 ;it's a greyscale picture
> window, xsize=200, ysize =150
newimage = dblarr(xsize,ysize)
newimage[(xsize-imageSize[0])/2:(xsize-imageSize[0])/2+image Size[0],(ysize-imageSize[1])/2:(ysize-imageSize[1])/2+imageS ize[1]]
= image
tv, newimage
> end

Create a new image that is the size of your window. Place the old image
within the centre of the newly created image and then display it. I hope
I didn't do any mistake within the implementation above; you might need
to adjust the indices slightly, I haven't tested it.

HTH & Regards,
Ingo

--
Ingo von Borstel <newsgroups@planetmaker.de>
Public Key: http://www.planetmaker.de/ingo.asc

If you need an urgent reply, replace newsgroups by vgap.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: reading in images
Next Topic: Max number of elements in an array

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:17:33 PDT 2025

Total time taken to generate the page: 0.00406 seconds