473,386 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Image viewer in PHP?

AaronL
99
Hey everyone,

I want to make an image viewer for the software that I'm developing, it's going to display products but I want it to have a magnifying glass to view up close similar to the image viewer that BigCommerce uses (but not junky looking)? Anyone know where I could start to look for code? Also, can PHP detect the size of an image that is being uploaded and if it's over a certain resolution have it resize the image?

Thanks!
Jan 20 '12 #1
3 1802
Dormilich
8,658 Expert Mod 8TB
Also, can PHP detect the size of an image that is being uploaded and if it's over a certain resolution have it resize the image?
if you saved the image somewhere (which will be at least a temporary file) you can get the filesize like any other file (there are a lot of filesystem functions). resizing can be done using the GD library 8and its functions.
Jan 20 '12 #2
AaronL
99
right but is there a way to detect what size the uploaded file is, for example, I want to see if the file is bigger than 1024x768 and if it is THEN resize it to 1024x768 maximum, if the size of the file is below that, then leave it alone...
Jan 21 '12 #3
Dormilich
8,658 Expert Mod 8TB
ah, image dimensions. there is an appropriate function in the GD library as well: getimagesize().
Jan 21 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Shumit Rehman | last post by:
Hi I have a table which has path names to photos I would like to view. I would like to open some/any kind of image viewer(Paint) to see the picture when I click the pathname. The pictures are...
2
by: John Fryatt | last post by:
Hi, Before I go on, let me just say I'm fairly new at this so excuse me if I say the wrong thing or use the wrong term. Anyway, what I am trying to do is to set up something where I can have a...
1
by: Dan | last post by:
I must develop a (C-sharp) winforms application which should display some relatively large (e.g. 2~5 MB JPEG each) photographic images together with a rich set of related information: the...
0
by: Jerry J | last post by:
I have a third party image viewer that can display various types of images. The image viewer is ActiveX and lives inside of Internet Explorer. To get the image viewer to retrieve an image, java...
4
by: Troy | last post by:
Hi all, Im a little new to ASP.NET. I'm looking to create an image viewer that zooms in, pretty common. But I need to draw a box on the 1:1 scale image and 'zoom in' on another picture box. ...
1
by: Kuldeep | last post by:
Hello All, Could you please give me some leads on building a Image Viewer in .NET or how to use Windows Picture and Fax Viewer. The actual purpose is to display the image in my web application...
1
by: zee | last post by:
hello Is it possible to use Document Image Viewer Control in ASP.NET(2.0) because 1. The IDE is not adding this component in the toolbox and 2. when i use it so it give me following error ...
0
by: Andrew | last post by:
Hello Ive been messing around with a simple raw image viewer using Pil and Tkinter However I am running into problems displaying the images they appear to be not correct I believe it is cause of...
4
by: =?Utf-8?B?RnJhbmsgVXJheQ==?= | last post by:
Hi all I need to do a image viewer, just to view and zoom pictures in jpeg. I do not need to edit or save the picture. I am sure, there are some controls already made. I am thankful for any...
0
by: marcellus7 | last post by:
Im looking for an image viewer that supports most types of image formats, including PDFs, and has the ability to rotate/zoom, and draw on an image. I've been looking but to no avail. Does anyone have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.