img size

D

diablo

hi

is there a way to restrict the width and height of an img?

what i want to do is if the img is less than 200x200 then i want it
displayed at its size. but if it is bigger that 200x200 then i want it to be
resized as 200x200.

thanks
 
R

rf

diablo

Er, G'day.
is there a way to restrict the width and height of an img?

what i want to do is if the img is less than 200x200 then i want it
displayed at its size. but if it is bigger that 200x200 then i want it to be
resized as 200x200.

Surely you know the size of the image. You are serving it up, aren't you?
You can adjust its size in you image editor.

BTW do not use the browser to resize an image. Browsers to a terrible job of
it.

Cheers
Richard.
 
D

David Dorward

diablo said:
is there a way to restrict the width and height of an img?

what i want to do is if the img is less than 200x200 then i want it
displayed at its size. but if it is bigger that 200x200 then i want it to
be resized as 200x200.

img { max-width: 200px; max-height: 200px; } in supporting browsers.

By the way, your shift key appears to be broken. I suggest you get it fixed
as it makes your Usenet postings look rather silly.
 
J

Jim Higson

diablo said:
hi

is there a way to restrict the width and height of an img?

what i want to do is if the img is less than 200x200 then i want it
displayed at its size. but if it is bigger that 200x200 then i want it to
be resized as 200x200.

If you are talking server side resizing, ImageMagick does this very well.
Off the top of my head, try:

convert --resize 200x200 whatever.png whatever-200.png

Of course, you'll need it installed first, but it's very likely to come as
default with a Linux/Unix server.

Jim
 
D

diablo

Hi All,

Thanks for the help and suggestions (shift key is fixed :)

You are right the browser img re-size is rubbish! I had lots of pics that I
wanted to show - I have opted for resizing them in Adobe Photoshop - time
consuming but...

Again thanks

Diablo
 
J

Jim Higson

diablo said:
Hi All,

Thanks for the help and suggestions (shift key is fixed :)

You are right the browser img re-size is rubbish! I had lots of pics that
I wanted to show - I have opted for resizing them in Adobe Photoshop -
time consuming but...

Of course, it's your time and your choice how you want to get a job done,
but with ImageMagick and some simple scripting the whole lot could be done
in bulk in just a few seconds.
 
J

Jonathan N. Little

Jim said:
diablo wrote:




Of course, it's your time and your choice how you want to get a job done,
but with ImageMagick and some simple scripting the whole lot could be done
in bulk in just a few seconds.



Although Corel gave up the fight with their product, Photo-Paint, I have
collected over the years a number of scripts (VBA) that I wrote to
automate such processes! But as a hint for a much cheaper alternative
IrfanViewer (freeware media 'Swiss Army Knife' utility - Google it) has
a simple batch processing that can resample, sharpen, filter, rotate,
change format, rename and more...
 
R

Rincewind

You are right the browser img re-size is rubbish! I had lots of pics that I
wanted to show - I have opted for resizing them in Adobe Photoshop - time
consuming but...

If your going to do a batch job on images then take a look at Irfanview,
does anything you want to a picture and completely free,
http://www.irfanview.com/. In the time it takes Photoshop to load you'll
have the job done with Irfanview.
 
D

dorayme

From: Rincewind said:
If your going to do a batch job on images then take a look at Irfanview,
does anything you want to a picture and completely free,
http://www.irfanview.com/. In the time it takes Photoshop to load you'll
have the job done with Irfanview.

Well, if the OP already has PS and it is open, the batching does
not take that long for things like resize of not very big pics
and can be as simple or sophisticated as one likes...

dorayme
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top