sorting files

ok so I'm having major issues trying to figure this out:

I have this program that I'm inputting the files in hte current directory which are image files...it spits out 5 line chunks describing the files...

filename: (name of file)
size: (100 x 200)
arbitrary data
arbitrary data
arbitrary data...

I need to change them into :
filename: size

and then organize them by size.

thus far I made a test file with the results...and was using
awk '/filename:/ {print$2} /size:/ {print $2 $3 $4}' testfile

Which is the closest I got to what I need...but it spits out:

file
size
file
size
file
size...

need help ....

Try:
awk '/size:/ {size=$2 $3 $4} /filename:/ {filename=$2} END {OFS=""; print filename, ": " ,size}' < data

yea that didn't work...it gave me :150 X 200 ...which is the last file size...

Try...

awk '/filename:/ {printf $2 ":"} /size:/ {print $2 $3 $4}' testfile

golden...thanks a ton = )