Display thumbnails as square while retaining aspect ratio


Posted on 16th Feb 2014 07:03 pm by admin

I am trying to figure out a way to make an image display as a square, for example 80x80 pixels, when the source file is rectangular.

The catch is that I want the image to look normal (not squished) so the image has to be "cropped" or something, for lack of a better term. However, it should not modify the original file, just change the way it is displayed.

It would be great if I could easily tie it into a <img> tag, so I can change the way it displays exactly where I want it to, and not where I don't.

I haven't been able to figure this out, any help is appreciated!

No comments posted yet

Your Answer:

Login to answer
96 Like 10 Dislike
Previous forums Next forums
Other forums

asking for direction
I have 2 tables in my data, which are "post" and "event"
I won't make a summa

Load Animated Image while cache is serve
I have a page that loads up using cache and took about 1 to 2 minutes before it loads to the page. <

Basic Forum Tutorial
Hi, I'm new to PHP. I want to build a basic forum for my site using PHP and MySQL. I've searched t

Help me with some material on Open Text Overview.
Hi Experts,
Please help me out with some material on Open Text. I have been supporting AP Workf

UL and LI Add Form
The idea I want here is when the user click on a character name from the drop down select bar at the

Procedural to OOP
ohn Kleijn said that to avoid writing "crappy code", we should learn OOP and common OO pri

Open browser page depending on XML results
Hello,

I have some PHP code that sends webbased from data to an external url ( in the form of

Combining refCursors and Summing
Given the following DDL:

CREATE TABLE FOODSALESTEST ("WEEKNBR" NUMBER, "ST

Adding Different Numbers From MySQL
Basically I have a mysql database with a couple prices as the following:

9.99
9.99
9.99

Having a problem get the selected item from a drop down menu
I have been looking at this for days now.

I have a drop down menu that get it's values from a

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash