I built myself a little image host as a project to test my skills in web design ( www.mahcuz.com/upload/). Everything is pretty much perfect but i've noticed on other image hosts that they have an image code for forums which, instead of showing the full size image, shows a thumbnail of the image.
Is there a way to save a thumbnail, of the image that has been upload, and save it in a directory?
Any ideas?
Thanks :)
8 1225
As I could remember here you can find such a script. Good luck.
As I could remember here you can find such a script. Good luck.
Hmmm, didn't help me really. But that is a great site :)
And thanks
Hmmm, didn't help me really. But that is a great site :)
And thanks
Did you read the entire application within 10 mins. What a miracle you are..
If the thumbnail creation portion is not there what is this create Thumbnail function.
Did you read the entire application within 10 mins. What a miracle you are..
If the thumbnail creation portion is not there what is this create Thumbnail function.
Yeh i saw that, and there's no need for sarcasm :)
I was just hoping for a more detailed approach not just a createThumbnail() peice of text that describes more about bear hunting than it does on how to use it in the way i need it ;)
Heya, Markus.
When the User uploads a file, the path to the uploaded file is located at $_FILES['nameOfTheFileInput']['tmp_name'].
You can load an image file into memory using imagecreatefromjpeg(), imagecreatefromgif() and imagecreatefrompng().
Use getimagesize() to determine the file's mime-type so that you know which function to use.
To save a file loaded in memory, use imagejpeg() (or if you want to save all your images as PNG files, use imagepng() instead).
Last edited by pbmods : Today at 11:15 PM. Reason: Washed Markus' mouth out with soap.
Hmmm....I know your style pb. But I missed the original post.
Hmmm....I know your style pb. But I missed the original post.
Well there was no reason for ajax to assume i'd just blew his advice off. I didn't.
And sorry.
And! Thanks, i've gotten it down now :) just getting an error when trying to save it
Thanks a bunch.
Heya, Markus.
Glad to hear you got it working! Good luck with your project, and if you ever need anything, post back anytime :)
This thread is now closed.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Luke Dubbber |
last post by:
I am currently new to PHP and I am reading a book by Premier Press called
PHP Professional Projects. I am new to PHP, I heard it was better and
faster and way more flexible so far they have been...
|
by: Michael Satterwhite |
last post by:
I'm having trouble with the functions for resizing a picture uploaded to my
server. Consider the following:
$jpeg = imagecreatefromjpeg($filePath); //I know this works!
$oldX =...
|
by: Peter Morris [Droopy Eyes Software] |
last post by:
Hi all
I have a JPG that has just been uploaded, and I now need to create a
thumbnail. I loaded the JPG using Image.Load and created a new image using
original.GetThumbnailImage, but when I...
|
by: moondaddy |
last post by:
I have an app where users will upload photos to their shopping cart. When
they review their cart I need to include a light weight thumbnail of the
image they uploaded. how can I take the image a...
|
by: asad |
last post by:
Hello friends, how ru all, i have some problem about saving created
thumbnail, following is the code i use for creating thumbnail but thumbnail
was not saved it is on memory which method is used to...
|
by: Brad |
last post by:
I have code which takes an image, uploaded from a web page, and saves it to
a database. Now I want to always resize an uploaded image before it is
saved to the database. My code to resize is...
|
by: pek |
last post by:
I created a file name image.php which contains only the following code:
<?php
function createThumbnail($picture,$thumb,$new_w,$new_h) {
$extension=substr($picture,strrpos($picture,".")+1);...
|
by: RB |
last post by:
Hi there,
I'm having a problem with an ASP.NET/VB.NET Control I am writing.
The control is a simple gallery control, which shows a set of thumbnails
(using a DataList), and a main image of the...
|
by: dodgeyb |
last post by:
Hi there,
Trying to allow client to upload image, thumbnail it, and save it into
sql table image field.
Code compiles & runs but image cannot be retrieved. any clues what I'm
doing wrong pls !
...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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,...
| |