Jump to content

How can I zoom in on an image


webuu

Recommended Posts

I would like to do exactly the same as this website. Here is a direct link http://www.pixeljoin...tm?sec=showcase If you click on the + under the image, watch how it scales. It looks good in IE and Firefox, but blurs in Chrome and etc. I would like to do exactly the same thing in php. To make it a perfect double scale everytime the user clicks on a + sign. Notice it scales multiple times. The point is, I searched the web on this and found that the graphics libraries available to php can do scaling but they all introduce bluring and etc. Does anyone know how this is done? The website in the example is written in ASP, so I can't ask the webmaster there for much help on this.

Link to comment
Share on other sites

I think all the link does is show an image with javascript not php. You'll also notice that it doesn't toggle. All you have to do is create a function that displays a hidden image with javascript. That's a great exercise for a newbie. Get started and we'll help you finish, but you have to demonstrate effort which might mean you might have to do a few tutorials first. Informed questions get the most help.

Edited by niche
Link to comment
Share on other sites

That probably is not actually a zoom but what may be actually happening is the image being enlarged(maybe by a certain percent amount) when clicking on the + button thus giving you the "zoon effect". You're seeing an instant update on the image without the browser refreshing the page may be because of the website using ajax. I done this with a project I am working on dealing with images.

Link to comment
Share on other sites

You need to use JavaScript for this effect and you need to 2 photos - one large image, one small image. When you click the button, the large image is displayed. Try these examples. It'll need some customising depending on how you want it to look.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...