Image Resizer For Wap Buddy Script...
Collapse
X
-
Guest
Image Resizer For Wap Buddy Script...
How can I preview the resized images of uploaded pictures in wap buddy script.Any body have a image resizer script for that? Help please
Gumslone......Subzero...........Lamar........
Tags: None
-
its faster easyer also add a download link as willCode:echo " <img src=\"$file_name\" height=\"80\" width=\"80\" alt=\"$file_name\"/> <a href=\"$file_name\">$file_name</a> ";
Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
Visit: WapMasterz Coming Back Soon!
_______
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______
Info & Tips
php.net
w3schools.com
-
Guest
but that is not reducing the image size
it iz downloading the whole image and browser is shrinking it to fit at that high and widh. Im thinking ti give away my gallery script made from Wap Buddy and image resizer
You can see it at my site and then gallery.
sorry if i removed any of your names of your scripts :| just tell me and i will put it back.
Comment
-
Guest
Ye bro..You are quite correct...Pls upload it with your post..Thankz.but that is not reducing the image size
it iz downloading the whole image and browser is shrinking it to fit at that high and widh. Im thinking ti give away my gallery script made from Wap Buddy and image resizer
You can see it at my site and then gallery.
sorry if i removed any of your names of your scripts :| just tell me and i will put it back.[/b]
Comment
-
Guest
I have these scripts image.php and wap buddy script.I wanna know how to combine these two to display resized image preview for downloadable pics.
Subzero ,how can I combine these two.Please edit below scripts to workin.
image.php
---------------------
This example will resample an image to half its original size.
-----------------
<?php
// The file
$filename = 'test.jpg';
$percent = 0.5;
// Content type
header('Content-type: image/jpeg');
// Get new dimensions
list($width, $height) = getimagesize($filename);
$new_width = $width * $percent;
$new_height = $height * $percent;
// Resample
$image_p = imagecreatetruecolor($new_width, $new_height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
// Output
imagejpeg($image_p, null, 100);
?>
-----------------------------------------------------------------------
index.php of wap buddy script
------------------------------------------------------------------------
<?
header("Content-type: text/vnd.wap.wml");
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""." \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
$conf["items_per_page"] = 2;
if (!isset($page)) {$page = 0;}
$total = 0;
if(!($dp = opendir("./"))) die ("Cannot open ./");
$file_array = array();
while ($file = readdir ($dp))
{
if(substr($file,0,1) != '.' and $file != "index.php" and $file != "search.php")
{
$file_array[] = $file;
}
}
$file_count = count ($file_array);
sort ($file_array);
?>
<wml>
<card id="card1" title="animations">
<p align="center">
<?
echo "";
echo "<img src=\"/images/logo.gif\" alt=\"logo\"/>
";
echo "Free Animations
";
echo "<img src=\"/images/line.gif\" alt=\"*\"/>
";
echo "
";
if ($file_count > 0)
{
$first_record = $page * $conf["items_per_page"];
$last_record = $first_record + $conf["items_per_page"];
while (list($fileIndexValue, $file_name) = each ($file_array))
{
if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
{
echo "<img src=\"image.php\" alt=\"---\"/>
";
echo "(". round(filesize($file_name)/1024,1) . "kb)
";
echo "<a href=\"$file_name\">DOWNLOAD NOW</a>
";
$total = $total + filesize($file_name);
}
}
if (($file_count > 0) AND ($page != 0))
{
// previous button
$prev_page = $page -1;
echo "
<a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">Prev Page</a>
";
}
if (($file_count > 0) AND ($last_record < $file_count))
{
// next button
$next_page = $page + 1;
echo "
<a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">Next Page</a>
";
}
echo "<img src=\"/images/line.gif\" alt=\"*\"/>
";
echo "
Total Files:
$file_count ";
if ($file_count == 1)
{echo "file";}
else
{echo "files";}
echo " (" . round($total/1024,1) . "kb)";
}
closedir($dp);
echo "";
?>
HOME
</p>
</card>
</wml>
Comment
-
Guest
that yours script is for resizeing only jpg images, mine (its not mine
) is resizeing jpg, gif and png images. OK, i will upload it somewhere on saturday, when i get home.
or i will build my own one till then.
Comment
-
Guest
Yethat yours script is for resizeing only jpg images, mine (its not mine
) is resizeing jpg, gif and png images. OK, i will upload it somewhere on saturday, when i get home.
or i will build my own one till then.
[/b]
Thanks Bro.........masterklan you rock!!! I can't wait till saturday...lol
Comment
-
Guest
here it is,
i build it today. just please dont remove author.gif , and you can edit only max image hight. which is more than enought.
just type max hight size, and if image has larger hight than set, it will resize it to fit set
and it can work with jpg, gif and png. http://wapx.biz/imageresize.zip i will upload it here on saturday. there is explanation in read me.txt
Attached Files
Comment
-
Guest
I have these scripts image.php and wap buddy script.I wanna know how to combine these two to display resized image preview for downloadable pics.
Subzero ,how can I combine these two.Please edit below scripts to workin.
image.php
---------------------
This example will resample an image to half its original size.
-----------------
<?php
// The file
$filename = 'test.jpg';
$percent = 0.5;
// Content type
header('Content-type: image/jpeg');
// Get new dimensions
list($width, $height) = getimagesize($filename);
$new_width = $width * $percent;
$new_height = $height * $percent;
// Resample
$image_p = imagecreatetruecolor($new_width, $new_height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
// Output
imagejpeg($image_p, null, 100);
?>
-----------------------------------------------------------------------
index.php of wap buddy script
------------------------------------------------------------------------
<?
header("Content-type: text/vnd.wap.wml");
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""." \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
$conf["items_per_page"] = 2;
if (!isset($page)) {$page = 0;}
$total = 0;
if(!($dp = opendir("./"))) die ("Cannot open ./");
$file_array = array();
while ($file = readdir ($dp))
{
if(substr($file,0,1) != '.' and $file != "index.php" and $file != "search.php")
{
$file_array[] = $file;
}
}
$file_count = count ($file_array);
sort ($file_array);
?>
<wml>
<card id="card1" title="animations">
<p align="center">
<?
echo "";
echo "<img src=\"/images/logo.gif\" alt=\"logo\"/>
";
echo "Free Animations
";
echo "<img src=\"/images/line.gif\" alt=\"*\"/>
";
echo "
";
if ($file_count > 0)
{
$first_record = $page * $conf["items_per_page"];
$last_record = $first_record + $conf["items_per_page"];
while (list($fileIndexValue, $file_name) = each ($file_array))
{
if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
{
echo "<img src=\"image.php\" alt=\"---\"/>
";
echo "(". round(filesize($file_name)/1024,1) . "kb)
";
echo "<a href=\"$file_name\">DOWNLOAD NOW</a>
";
$total = $total + filesize($file_name);
}
}
if (($file_count > 0) AND ($page != 0))
{
// previous button
$prev_page = $page -1;
echo "
<a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">Prev Page</a>
";
}
if (($file_count > 0) AND ($last_record < $file_count))
{
// next button
$next_page = $page + 1;
echo "
<a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">Next Page</a>
";
}
echo "<img src=\"/images/line.gif\" alt=\"*\"/>
";
echo "
Total Files:
$file_count ";
if ($file_count == 1)
{echo "file";}
else
{echo "files";}
echo " (" . round($total/1024,1) . "kb)";
}
closedir($dp);
echo "";
?>
HOME
</p>
</card>
</wml>[/b]
Subzero.Lamar......Any one....How can I link to the image file to resize in image.php?
Comment
-
with script
Code:<?php // The file $filename = 'test.jpg'; <!--- here is you place ya images $percent = 0.5; // Content type header('Content-type: image/jpeg'); // Get new dimensions list($width, $height) = getimagesize($filename); $new_width = $width * $percent; $new_height = $height * $percent; // Resample $image_p = imagecreatetruecolor($new_width, $new_height); $image = imagecreatefromjpeg($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height); // Output imagejpeg($image_p, null, 100); ?>
ech images you upload change image to file name that you put in testCode:<? echo "[size="1"]"; echo "<img src=\"/images/logo.gif\" alt=\"logo\"/> "; echo "[b][u]Free Animations[/u][/b] "; echo "<img src=\"/images/line.gif\" alt=\"*\"/> "; echo "[b][/b] "; if ($file_count > 0) { $first_record = $page * $conf["items_per_page"]; $last_record = $first_record + $conf["items_per_page"]; while (list($fileIndexValue, $file_name) = each ($file_array)) { if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record)) { echo "<img src=\"image.php\" alt=\"---\"/> "; <!-- you change size names echo "(". round(filesize($file_name)/1024,1) . "kb) "; echo "<a href=\"$file_name\">DOWNLOAD NOW</a> "; $total = $total + filesize($file_name); } } if (($file_count > 0) AND ($page != 0)) { // previous button $prev_page = $page -1; echo " <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">Prev Page</a> "; } if (($file_count > 0) AND ($last_record < $file_count)) { // next button $next_page = $page + 1; echo " <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">Next Page</a> "; } echo "<img src=\"/images/line.gif\" alt=\"*\"/> "; echo " Total Files: $file_count "; if ($file_count == 1) {echo "file";} else {echo "files";} echo " (" . round($total/1024,1) . "kb)"; } closedir($dp); echo "[/size]"; ?> [size="1"][url="/wap/home.php"]HOME[/url][/size] </p> </card> </wml>Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
Visit: WapMasterz Coming Back Soon!
_______
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______
Info & Tips
php.net
w3schools.com
Comment
-
Guest
with script
Code:<?php // The file $filename = 'test.jpg'; <!--- here is you place ya images $percent = 0.5; // Content type header('Content-type: image/jpeg'); // Get new dimensions list($width, $height) = getimagesize($filename); $new_width = $width * $percent; $new_height = $height * $percent; // Resample $image_p = imagecreatetruecolor($new_width, $new_height); $image = imagecreatefromjpeg($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height); // Output imagejpeg($image_p, null, 100); ?>
ech images you upload change image to file name that you put in test[/b]Code:<? echo "[size="1"]"; echo "<img src=\"/images/logo.gif\" alt=\"logo\"/> "; echo "[b][u]Free Animations[/u][/b] "; echo "<img src=\"/images/line.gif\" alt=\"*\"/> "; echo "[b][/b] "; if ($file_count > 0) { $first_record = $page * $conf["items_per_page"]; $last_record = $first_record + $conf["items_per_page"]; while (list($fileIndexValue, $file_name) = each ($file_array)) { if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record)) { echo "<img src=\"image.php\" alt=\"---\"/> "; <!-- you change size names echo "(". round(filesize($file_name)/1024,1) . "kb) "; echo "<a href=\"$file_name\">DOWNLOAD NOW</a> "; $total = $total + filesize($file_name); } } if (($file_count > 0) AND ($page != 0)) { // previous button $prev_page = $page -1; echo " <a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">Prev Page</a> "; } if (($file_count > 0) AND ($last_record < $file_count)) { // next button $next_page = $page + 1; echo " <a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">Next Page</a> "; } echo "<img src=\"/images/line.gif\" alt=\"*\"/> "; echo " Total Files: $file_count "; if ($file_count == 1) {echo "file";} else {echo "files";} echo " (" . round($total/1024,1) . "kb)"; } closedir($dp); echo "[/size]"; ?> [size="1"][url="/wap/home.php"]HOME[/url][/size] </p> </card> </wml>
Do you say I have to put each image's file name on 'test.jpg'? I want to display the 5 resized images for 1 page in wap budy script .
Comment
-
<---- is where you look at
ok thats how that image sizer worksVisit: Chat4u.mobi - The New Lay Of being a site of your dreams!
Visit: WapMasterz Coming Back Soon!
_______
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______
Info & Tips
php.net
w3schools.com
Comment
Comment