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

Insert Failing.
Hey,
I am making a Sign up page for a website, but the insert query into the Database does not se

Help with parsing this html
Hi,
I've got some html i just need a couple of strings from.. argh, it's freaking me out. I've t

php form help
Hey,

I use a control file to set my meta tags and titles

Here's an example
Code: &a

selection tool on raster image
Hi!
I have to implement in my app a selection tool which lets users to select region of any shape

javascript in php code causes page to display white
Hi All,

Odd one this, I've got the following code (below) which is a simple log in form. The

ClientScript.RegisterClientScriptBlock Issue
This is what I haveview plaincopy to clipboardprint?Protected Sub posrback_Click(ByVal sender As Obj

Preg_match unknown modifyer
Hello,

Im trying to write a little script for my forums i need to get the reply from my forum

quick question about System Change Number(SCN) in FlashBack Query topic
i know tht we can get the SCN of the database using flashback concept as follows

SQL>

Modal Popup Help
Hi guys, I have a modal popup with an iframe. How can i send data from a label or textbox to the ifr

Displaying Multidimensional Arrays...about to put my head in a vice, PLEASE HELP
I am fairly new to PHP and MySQL and I have a problem which I have been trying to resolve for days.

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