/    Sign up×
Community /Pin to ProfileBookmark

Hi,

q)Can you rescale images on your directory using php and display them . The reason is that some phtos are large and some small and it is easier to display a few dozen on a webpage when the sizes are all the same. You could then click on a photo then display the actual size.

q) when displayng images from a list or anything, it is easier to display the images over the current page, so is using php-self perfect for this scenario. You woud need session variables I take it.

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@LitewebsiteNov 15.2006 — q)Can you rescale images on your directory using php and display them.[/QUOTE]

You can use the functions [URL=http://www.php.net/imagecopyresized]imagecopyresized[/URL] and [URL=http://www.php.net/imagecopyresampled]imagecopyresampled[/URL] to resize a given image.
Copy linkTweet thisAlerts:
@jagguyauthorNov 16.2006 — Hi,

Does this allow you to resize an image and save a copy to a file? I don't want to display an image using header('Content-type: image/jpeg'); as this makes my full webpage impossible to display.
Copy linkTweet thisAlerts:
@bokehNov 16.2006 — Imagecopyresized and imagecopyresampled work on the resources loaded in the ram. They don't output anything.

What you are trying to do is a multistep procedure; open file, create resource, open a slate to draw on, resize the full image to the slate and then either output it or save it to file. The above functions just cover one step in that process.
Copy linkTweet thisAlerts:
@jagguyauthorNov 16.2006 — I am asking what code you need to do this etc open a file and resize it with what? then save again?
×

Success!

Help @jagguy spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...