You are here: PSPad forum > English discussion forum > Resize images keeping aspect ratio

Resize images keeping aspect ratio

#1 Resize images keeping aspect ratio

Posted by: Eyael | Date: 2008-01-28 17:26 | IP: IP Logged

I was wondering whether there was a way to (like an extension) to resize images keeping the aspect ratio with PSPad. An example to illustrate what I mean :

Let's say I have an image I want to include in a HTML page with reduced size and a link so that if the viewer click on it the image will display in its original size and I want to use just one image for that.

My original picture's dimensions would be height="250" and width="450"
Well, I'd like to have the width reduced to 300, so I would like something to calculate what the new height should be so that the aspect ratio is respected (so that the image is not deformed). I usually use Kompozer or an external image editor to that, but it's a bit tricky when I have many pages with images so I would appreciate a solution using only PSPad.

Options: Reply | Quote | Up ^


#2 Re: Resize images keeping aspect ratio

Posted by: pspad | Date: 2008-01-28 19:05 | IP: IP Logged

PSpad isn't graphic editor. It doesn't contains picture manipulation functions.

Options: Reply | Quote | Up ^


#3 Re: Resize images keeping aspect ratio

Posted by: MrSpock | Date: 2008-01-28 19:27 | IP: IP Logged

Eyael, I guess what you mean is not changing the actual size of the image, but only the display size, like:
<img width="100" height="200" ...>becomes<img width="50" height="100" ...>. Right?
This wasn't exactly your question, but why don't you try using only one of the attributes? AFAIK, all browsers will scale the image correctly if you only give width or height.

Options: Reply | Quote | Up ^


#4 Re: Resize images keeping aspect ratio

Posted by: Eyael | Date: 2008-01-28 19:52 | IP: IP Logged

Yes, I did mean changing the display size, sorry!
I didn't know that if you only put one of the dimension, the browser will put the other right. Thanks for the tip, I shall give it a try!

Options: Reply | Quote | Up ^


#5 Re: Resize images keeping aspect ratio

Posted by: Eyael | Date: 2008-01-29 17:49 | IP: IP Logged

Just to let you know I've tried your tip and it worked perfectly so I guess that will be it. Thanks a lot!

Options: Reply | Quote | Up ^


#6 Re: Resize images keeping aspect ratio

Posted by: MrSpock | Date: 2008-01-29 23:03 | IP: IP Logged

Ah, excellent. smiling smiley

Options: Reply | Quote | Up ^


#7 Re: Resize images keeping aspect ratio

Posted by: lily | Date: 2014-03-07 02:30 | IP: IP Logged

pspad:
PSpad isn't graphic editor. It doesn't contains picture manipulation functions.

so you mean we need a graphic editor to resize image size. and what image editor will be suitable at this situation . because we want to keep the ratio the same. thank you in advance.

Edited 1 time(s). Last edit at 2014-03-07 02:30 by lily.

Options: Reply | Quote | Up ^


#8 Re: Resize images keeping aspect ratio

Posted by: carbonize | Date: 2014-03-07 09:00 | IP: IP Logged

Resizing images by HTML is bad practice. They tend to look terrible and can be a waste of bandwidth. Always resize an image to the desired size using an image editor.

As to your choices any fully fledged editor such as GIMP, Paint.NET, Paintshop Pro etc will do it or most image viewers such as Irfanview or XNView have the ability to resize and all will have the option to maintain aspect ratio.

--
Carbonize

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR