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

Home » Public Forums » archive » Array resize with arbitrary arithmetic
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
Array resize with arbitrary arithmetic [message #52945] Mon, 12 March 2007 13:23
rpertaub@gmail.com is currently offline  rpertaub@gmail.com
Messages: 43
Registered: January 2007
Member
I have this 640x240 array. I need to change it to a 320x240 array.
However, in first array, consecutive 2 pixels hold information for 1
pixel in second array and I need to do a certain bit of arithmetic to
obtain that. This should not be too difficult, except I keep getting
errors and I am not sure why:
This is what I do:

pro compress_image

image=read_bmp('9 March 2007\775u.bmp') ; 640x240 array

comp_image=make_array(76800,/long) ;1x76800 array that I can
reform to 320x240array later

temp=0

for j=0,239 DO BEGIN
for i=0,319 DO BEGIN

comp_image[0,temp]= image[2*i,j]*256 + image[2*i+1,j] ;
arithmetic necessary
temp=temp+1
endfor

endfor


end


Any insight would really be appreciated!
Thanks
Radha
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: fifo - pointer
Next Topic: Re: Yet again, The Sky is Falling!

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

Current Time: Sun Oct 12 00:01:45 PDT 2025

Total time taken to generate the page: 0.01325 seconds