With this little bit of code you are able to get the height and width of an image in php.
list($width, $height) =getimagesize($file); echo $width; echo $height;
With this little bit of code you are able to get the height and width of an image in php.
list($width, $height) =getimagesize($file); echo $width; echo $height;
In a previous post I refer to image optimization. I started working with image optimization when i got reports from the google webmaster tools that the images used in my web sites are not optimized.
Searching in the internet I ended up working with jpegtran and optipng for the optimization of the images I use in the web. I use the following two batches to automate somehow the whole process. I place the image inside the “Optimize” folder and then according to the file type run the appropriate batch script.
cd "E:\Dropbox\wamp\www\Optimise" E: FOR %%G IN (*.jpg) DO ( copy %%G log\%%G "E:\Dropbox\wamp\www\Optimise\JPGPNGOPT\jpegtran\jpegtran.exe" -optimize %%G %%G MOVE %%G OPTED\%%G )
FOR %%G IN (*.png) DO ( copy %%G log\%%G "E:\Dropbox\wamp\www\Optimise\JPGPNGOPT\pngout.exe" "E:\Dropbox\wamp\www\Optimise\%%G" "E:\Dropbox\wamp\www\Optimise\%%G" /y MOVE %%G OPTED\%%G )
The Ebay partner network is another way to monetize your web site (from adsense). Initially you need to apply to their web site, and after around a week you will get an email welcoming /or not you to their network.
Ebay easy ways to generate links or banners to their products (links, banner generator, api, widget):
The link generator allows you to create a trackable link to any of eBay Partner Network’s program pages and is great for all types of business models. Best of all, by using this tool to direct visitors to relevant pages you can significantly increase conversion rates
Choose from a variety of colorful graphic and interactive ads to enhance your site and attract visitors to eBay Partner Network pages from your webpage.
Including RSS Feeds, and Custom Banners; we offer innovative and customizable widgets to drive traffic and increase user conversions.
Leverage eBay’s advanced web services platform to develop innovative applications to tap into eBay’s marketplace. Our API provides tools and services that meet the diverse needs of over 200 million online shoppers. You can use virtually any programming language to interface with eBay Web Services!
I ll post some updates as soon as i get the first payment.. if..
I have been searching for some time an easy way to change the size of jpg and png images on the fly – on the server. currently my preferred solution is the PHP Image resize script found here ..
The solution is extremely easy to implement. I use it to convert almost 1000 images whos filenames have stored in the database (on the fly).
Have found the following issues though:
$file="./brands/".$row_Recordset1['NAME']."/logo.png";
$resizedFile="./brands/".$row_Recordset1['NAME']."/".strtolower(str_replace ( ' ', '-', $row_Recordset1['NAME']))."_reslogo.png";
list($width, $height) =getimagesize($file);
echo $width;
//echo $height;
if (file_exists($file)){
if (file_exists($resizedFile)){
//to nothing
}else {
smart_resize_image($file , null, 201 , null , true , $resizedFile , false , false ,100 );
}
}else{
$resizedFile="./brands/no-logo-yet.png";
}
Update: Found that issue #2 was caused by the fact that i was scaling the image up, rather than down. Issue #1 still persists though.
Here is a very informative post about the jpg image optimization and resizing using php native functions
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
You can also leave it as it is and continue writing below it.
This is the 17th time i set up a wordpress site for tharsitis.gr. This time i am committed to it. I will try to have regular updates of my IT-life.