FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Need a PHP script to downsample the image resolution





bukaida
Can anybody provide any php script which can print the resolution of the selected image(Tiff, jpeg i.e mainly scanned image) and can be used to downsample the resolution according to user's choice?
Mgccl
resolution? you mean image size?
getimagesize() function will help Smile
bukaida
Does the GD library supports Tiff format? No where it is mentioned clearly.Also in my gd info is----

GD Version: bundled (2.0.28 compatible)
FreeType Support: Enabled
FreeType Linkage: Enabled
T1Lib Support: Disabled
GIF Read Support: Enabled
GIF Create Support: Enabled
JPG Support: Enabled
PNG Support: Enabled
WBMP Support: Enabled
XBM Support: Enabled
JIS-mapped Japanese Font Support: Disabled

Will it do or I have to change something?Tiff support is mainly required.
Also downsampling here mentioned are all about reducing the size, but I want to reduce the resolution(i.e from 600 DPI to 300 DPI or something like that).Please help.
ncwdavid
If you want to make the image appear a certain size if its bigger then a size you want you can just do this:
Code:

list($width, $height) = getimagesize("IMAGE_LOCATION_HERE");
echo "<img src='IMAGE_LOCATION_HERE'";
if($width>250){
echo " width='250' ";
}
if($height>200){
echo " height='200'";
}
echo ">";


That should work. Its just something put together there. Let me know if it works.
bukaida
I want to reduce the reselution not size i.e from 600 dpi to 300 dpi.Gd library does not say much about tiff images.Please help.
Related topics
Phoenix free PHP scripts
error in my PHP script
how can i make a php script for enter username and password?
Inserting data to MYSQL with a PHP script
Running a "Hello World" php script
[PHP] Running Cron Jobs Via PHP Script
Simple PHP script not working
PHP Script- How can we install it
I need a VERY simple php script
PHP Script needed
Logging systeem php script
Preventing bad PHP script calls
Connected to another part of a php script.
Uploading an Image using PHP script - RESOLVED
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.