473,396 Members | 2,147 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,396 software developers and data experts.

Uploading Images onto a web page and resizing automatically

Hello,

I have searched everywhere and found no "basic answers" for this (also,i apologise if it is in the wrong page, i ust heard that PHP might work), i have neen searching around the internet for something that will allow me to put all of my images into one folder on my server, and then they are automatically resized and shows on a particular page, without me having to resize the pictures one by one myself and add them to my website? I hope you understand what i mean. This would really be a useful tool, and i would be willing to pay also.

Thanks for your time.

RobbieBrown34
Nov 21 '06 #1
7 1838
ronverdonk
4,258 Expert 4TB
Have a look at the free class Gallery Generator
What it does:
This class can be used to generate a gallery of pictures from image files contained in a given server folder.

It scans a given folder to list the files with GIF, PNG, JPEG and BMP extensions. Then it outputs HTML pages showing thumbnails of the images that were found. The full size images are opened in pop-up windows.

The width of the gallery pages, the number of images per row and the number of images per page are configurable.

The gallery shows buttons to advance to the next or previous pages.
Ronald :cool:
Nov 21 '06 #2
Hello,

Many thanks for the very fast reply and suggestions.
Now, the next question i have is...how do i get it to work? because in thge downloaded ZIP file, there is no README or anything like that.
Please understand that i am a Basic PHP user, i have no problems editing the code, but its just making it to work with my page?

Thanks

RobbieBrown34
Nov 21 '06 #3
ronverdonk
4,258 Expert 4TB
In the gallery.php file you'll find everything you need.
// 1 : param = folder where to find the images
// 2 : param = width of the gallery
// 3 : param = nbr thumbnails images per page
// 4 : param = nbr thumbnails images per line
// 5 : param = width of the thumbnail pictures
// 6 : param = height of the thumbnail pictures
// 7 : param = max width of the picture to display
// 8 : param = max height of the picture to display
// 9 : param = verbose mode
// to use it just insert the number you want...
// example : if I want the name and the file size so I set "13"
// example : if I just want the name I just put "1"
// example : if I want the name, the name of the folder and the file size I put "123"
// example : if I want the name, the folder and the name again I put "121"
// 0 = no verbose mode
// 1 = display name
// 2 = display the name of the folder
// 3 = display the file size in Ko
// 4 = display the width and the height of the file
// 10 : param = display the border of the gallery or not
// warning that the thumbnails image are $width pix long
// so the param number 4 should be less or equal than param 2 / $width
Expand|Select|Wrap|Line Numbers
  1. $gal->InitGallery($folder, 600, 25, 5, $width, $height, $maxwidth, $maxheight, $verbose, $bd);
Pay attention to $folder = "./img/" which defines in what folder where your images are, respective to the folder in which you run gallery.php.
Adapt gallery.php to your requirements/wishes and just run it.

Ronald :cool:
Nov 21 '06 #4
cassbiz
202 100+
On line 15 of gallery.php you define the directory of where it has to search.
Nov 21 '06 #5
ronverdonk
4,258 Expert 4TB
On line 15 of gallery.php you define the directory of where it has to search.
Mine is line 14 but, as I said:
Pay attention to $folder = "./img/" which defines in what folder your images are, respective to the folder in which you run gallery.php.
Ronald :cool:
Nov 21 '06 #6
Hello Again,

Sorry to keep bothering you like this, but is there anyway i can embed the Gallery into an existing page on my site?

Thanks
Nov 22 '06 #7
ronverdonk
4,258 Expert 4TB
Good place to start is looking in the DisplayGallery function in the class file. Maybe cassbiz has done that already.

Ronald :cool:
Nov 22 '06 #8

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

Similar topics

2
by: Alex Hopson | last post by:
I'm using the code below to loop through some images and resize each image twice, once to create a thumbnail and once to create a small image. The page stops loading around the 38th image out of...
1
by: Chris Nafziger | last post by:
In my code to send email from VBScript, I use standard CDOSYS code similar to the following: With oMsg Set .Configuration = oCon .To = """Admin"" <admin@mycompany.com>" .From =...
8
by: Keith Thompson | last post by:
I checked the FAQ, but didn't find an answer to this question. I also checked the O'Reilly HTML and CSS books, with a similar lack of results, though I could have missed something in the CSS book....
6
by: Robert J. O'Hara | last post by:
I'm one of those people who practices what some consider "dull" and others consider "elegantly conservative" page design. I appreciate good traditional typography and standards-compliant liquid...
5
by: Maxi | last post by:
I have a 30X16 cells table in my html page. Table height and width are set to 100%. I have set size of every cell inside the table to 24 pixel. When I open the html page in maximize state in...
5
by: bungle | last post by:
Hi Would anyone be able to offer advice on how they would upload images to SQL Server 2005 so that if they are too big the system will automatically resize them first? Obviously you need to get...
221
Atli
by: Atli | last post by:
You may be wondering why you would want to put your files “into” the database, rather than just onto the file-system. Well, most of the time, you wouldn’t. In situations where your PHP application...
1
by: flg22 | last post by:
Hi I am working on this Rock, paper, scissors java game and the program works, but I can not figure out how to get the images to load onto the program. So my question is how do I get the images to...
3
by: =?Utf-8?B?UiBSZXllcw==?= | last post by:
Hi! This discussion may help other programmers get a better idea of how to save uploaded images through a website. Why? Well currently, I save 3 versions of every uploaded image on my own...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.