anySize is a lightweight, drop-in, fully automated, caching, make-you-coffee-and-serve-it-in-bed script that lets you request and generate images (jpg, gif or png) of any size.
You upload “image.png” to your image folder, “images”
- <img src=”images/image.png” />
The image is returned at its native resolution
- <img src=”images/resized/image.png?s=thumb” />
A thumbnail is presented
- <img src=”images/resized/image.png?s=medium” />
A medium sized image is presented
- <img src=”images/resized/image.png?w=100&h=150” />
An image with max width 150px and max height 100px is presented. Aspect ratio is maintained.
- <img src=”images/resized/image.png?w=100&h=150&a=false” />
An image with width 150px and height 100px is presented. Aspect ratio is NOT maintained.
And now for the awesome:
When you request an image the first time the result is stored in a cache folder and all further requests use that cache. Image file updated and re-uploaded? No need to flush the cache; everything is automatically taken care of!
Want to define the size of your “thumbnail” image? Want to add a “megaawesome” option so you can request images/image.png?s=megaawesome ? Want to disable arbitrary resizing (options 4 & 5)? No problem! Everything is set up in the first few lines of the code using intuitively-named variables. Works out of the box but is extremely easy to customize.
The following are flags and variables the system understands:
s: (Set Size)
Ex: <img src=”images/resized/image.png?s=someSize” />
Returns an image of a pre-determined size (as set at the top of the anySize.php file)
The default sizes out of the box are:
- s=thumb: max size 60×60 image.
- s=small: max size 200×200 image.
- s=medium: max size 400×400 image.
- s=large: max size 800×800 image.
Note: These sizes are truly simple to change, add, remove, etc. Comments in the file show how to edit these sizes.
Ex: <img src=”images/resized/image.png?w=100” />
Returns an image with a width of 100px. Unless specified, aspect ratio is preserved.
Ex: <img src=”images/resized/image.png?h=150” />
Returns an image with a height of 100px. Unless specified, aspect ratio is preserved.
a: (Aspect Ratio)
Ex: <img src=”images/resized/image.png?w=100&h=150&a=false” />
Returns an image with a width of 100px and a height of 150px; Aspect ratio is ignored and the image WILL be 100px wide and 150px tall if a=false
Note: If you set both w and h and do not set a to “false” the system will produce an image that fits within the box defined by w and h while maintaining the aspect ratio. Essentially w and h, when set together, form a bounding box for the result image. See Example 4 for how this might look in code.
But wait! There’s more!
Included in the anySize download is a speed-optimized version of the script that uses just the size flag (s) and boosts the cache speed for truly lightweight and lightening fast operation.
- August 7th 2009: Added transparency support for PNG and GIF files.
Download Png Image
Subscribe Our Youtube Channel
Using Virtual Reality to Engage Special Demands Students
VR is mostly a new form of entertainment that allows users to immerse themselves in an encounter like zero other....
Antivirus Software Rewards
Antivirus computer software can help give protection to your computer against phishing scams and destructive software. Older adults are particularly...
Ideal Data Room Services
Best data room providers are a combination of functionality and ease of use. Some data room providers present features such...
On the web Security Guidelines
In an progressively connected world, web based security is of critical importance for everyone, right from individuals to businesses. We...
What you need to Know About Organization Process Motorisation Software
While you’re continue to deciding whether to use organization process motorisation software, there are a few things you should know...
Which in turn Business Expansion Software is Good for Your Company?
Business production tools help your company run smoothly and scale. That they cut around all departments within your business. From...
The right way to Market an electronic Business
There are a number of ways to market a digital organization. You can use digital marketing strategies to build brand...
Malware Review — What to Look For in Antivirus Software
An anti-virus review will let you decide if the particular applications are worth the charge. This can be especially useful...
The way to select the Perfect Ant-virus Software For Your PC
If you want the very best antivirus software program for your PC, then get come to the right place. There...
Greatest Free Antivirus security software
If you’re looking for the best cost-free antivirus that you can purchase, then you’ve come to the right place. Presently...
What Board Websites Can Perform For Your Company
In this article, we are going to look at what board websites can carry out for your organization. Plank portals...
VPN and Anti-virus
VPN and antivirus operate tandem to be sure your online reliability. While anti virus protects your laptop or computer against...
Ways to Keep Your Economic Data Secure
As the earth becomes even more digital, financial support organizations will be collecting 360-degree views of customers’ activities and writing...
Is usually Free Malware For Business Perfect for Your Business?
A free antivirus for business method comes with a number of benefits, although it’s a bad means to fix every...
The best Antivirus Application
If you’re looking for the perfect anti virus software, you may have come to the right place. There are many...
Wordpress Plugin8 months ago
Real Estate Agency Portal
Video Templates2 years ago
Cartoon Logo Reveal | After Effects Template
Scripts2 years ago
Signup Php Portal
Wordpress Plugin3 years ago
AdLinkFly – Monetized URL Shortener
Scripts2 years ago
GetFund – A Professional Laravel Crowdfunding Platform
Software3 years ago
Ardfry psd codec free download With Licence Key
Video Templates2 years ago
Trendy Sales Badges – MOGRT
Wordpress Themes2 years ago
VideoPro Video WordPress Theme 18.104.22.168