Need Help to getimage height and width in centimeter

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mayankbha
Forum Newbie
Posts: 4
Joined: Sun Nov 28, 2010 8:58 am

Need Help to getimage height and width in centimeter

Post 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.
Neilos
Forum Contributor
Posts: 179
Joined: Fri Nov 19, 2010 2:07 am

Re: Need Help to getimage height and width in centimeter

Post 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.
mayankbha
Forum Newbie
Posts: 4
Joined: Sun Nov 28, 2010 8:58 am

Re: Need Help to getimage height and width in centimeter

Post 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.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Need Help to getimage height and width in centimeter

Post 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.)
mayankbha
Forum Newbie
Posts: 4
Joined: Sun Nov 28, 2010 8:58 am

Re: Need Help to getimage height and width in centimeter

Post 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.
Post Reply