Page 1 of 1

Need Help to getimage height and width in centimeter

Posted: Sun Nov 28, 2010 9:05 am
by mayankbha
Hello ,

I need some assistance to convert image size into centimeter. What i actually want is, i have a from and i want to upload many images at once and want to save all in one column. My problem is when i upload image and select the image , immediatly after selecting the image but before submit the form i just want its height and width in a textbox in centimeter.

Really i want this answer very soon .

Please reply as soon as possible.

Re: Need Help to getimage height and width in centimeter

Posted: Sun Nov 28, 2010 9:58 am
by Neilos
If you want to display it without reloading the page then you'll need to use javascript or something client side, not php.

Re: Need Help to getimage height and width in centimeter

Posted: Sun Nov 28, 2010 10:39 pm
by mayankbha
Thanks for reply.

Yes i want to do it without refreshing the page but if i use java script then how i will save these images in database because i also want to save these images in database.

Reply ASAP.

Thanks.

Re: Need Help to getimage height and width in centimeter

Posted: Mon Nov 29, 2010 2:08 am
by requinix
So why do you need centimeters? I ask because you could very well be doing something badly.

That, and the pixel->centimeter conversion rate varies. That's why you can't do it in PHP - you need to actually render the image before you can determine the size. (That, or assume a certain display resolution that probably isn't true.)

Re: Need Help to getimage height and width in centimeter

Posted: Mon Nov 29, 2010 10:16 am
by mayankbha
Actually i just want to calculate image cost like if i give some image aid in news paper so i just want to calculate image per square centimeter rate so with the help of that i can calculate total cost to print the aid on newspaper.