i did it but image pixel was not decreased. image pixel was increased.
for example my image 400*800 and my maxwidth=100
maxwidth=100
imageprop=4/100=0.25
imagevsize=800*0.25=200
width=100"px"
i dont understand this reason of this mod :s
how can i write "px" sections