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 
Return to the default flat view Create a new topic Submit Reply
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.
[Message index]
 
Read Message
Read Message
Read Message
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: Sat Oct 11 01:52:20 PDT 2025

Total time taken to generate the page: 0.48026 seconds