Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Scaling IMG

Reply
Thread Tools

Scaling IMG

 
 
Roy Schestowitz
Guest
Posts: n/a
 
      04-21-2005
I have been been searching the Web, trying to find a way of resizing images
while retaining the original aspect ratio. I know I can use 'height' and
'width', but finding out the necessary values for many images is laborious.
Is there an equivalent (with or without CSS) to 'scale' in LaTeX? For
example <img scale="80%" src="myimage" />?

Thanks in advance,

Roy

--
Roy S. Schestowitz
http://Schestowitz.com
 
Reply With Quote
 
 
 
 
Mark Parnell
Guest
Posts: n/a
 
      04-21-2005
Previously in alt.html, Roy Schestowitz <>
said:

> I have been been searching the Web, trying to find a way of resizing images
> while retaining the original aspect ratio.


Even a basic image editing program should be able to handle that.

> I know I can use 'height' and
> 'width', but finding out the necessary values for many images is laborious.


Yes, but resizing images in HTML is a bad idea anyway. Use a proper
image editor.

--
Mark Parnell
http://www.clarkecomputers.com.au
alt.html FAQ :: http://html-faq.com/
 
Reply With Quote
 
 
 
 
Roy Schestowitz
Guest
Posts: n/a
 
      04-21-2005
Mark Parnell wrote:

> Previously in alt.html, Roy Schestowitz <>
> said:
>
>> I have been been searching the Web, trying to find a way of resizing
>> images while retaining the original aspect ratio.

>
> Even a basic image editing program should be able to handle that.



Although it is not a perfect analogy, it is similar to saying "I can make
this Web page in Word and it looks okay on my computer". I want to use the
powers of HTML/CSS rather than editing images.


>> I know I can use 'height' and
>> 'width', but finding out the necessary values for many images is
>> laborious.

>
> Yes, but resizing images in HTML is a bad idea anyway. Use a proper
> image editor.


But that's done off-line. What if I want to have one image displayed in two
different forms (sizes) without duplicating? Also, resizing in the usual
way involves no smoothing.

Roy

--
Roy S. Schestowitz
http://Schestowitz.com
 
Reply With Quote
 
Mark Parnell
Guest
Posts: n/a
 
      04-21-2005
Previously in alt.html, Roy Schestowitz <>
said:
> Mark Parnell wrote:


[Resizing images]
>> Even a basic image editing program should be able to handle that.

>
> Although it is not a perfect analogy, it is similar to saying "I can make
> this Web page in Word and it looks okay on my computer".


Your original request bears more similarity to that analogy than my
answer does.

> I want to use the
> powers of HTML/CSS rather than editing images.


It's like saying you want to display the image with a yellow background
instead of blue using HTML and CSS. The height and width of an image are
an intrinsic part of the image itself, and thus are best changed in a
program designed for that purpose.

>> Yes, but resizing images in HTML is a bad idea anyway. Use a proper
>> image editor.

>
> But that's done off-line.


Well not necessarily, but in most cases it is, yes.

> What if I want to have one image displayed in two
> different forms (sizes)


Upload 2 copies of the image in different sizes.

> without duplicating?


You only upload the smaller one and put up with the ugly enlargement. Or
you only upload the larger one, and anyone on dialup will hate you
because they have to download the larger file, even if they are only
looking at the smaller one.

--
Mark Parnell
http://www.clarkecomputers.com.au
alt.html FAQ :: http://html-faq.com/
 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      04-21-2005
Roy Schestowitz wrote:

> I have been been searching the Web, trying to find a way of resizing images
> while retaining the original aspect ratio. I know I can use 'height' and
> 'width', but finding out the necessary values for many images is laborious.


Set a width and the height will automatically adjust itself.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
Roy Schestowitz
Guest
Posts: n/a
 
      04-21-2005
Mark Parnell wrote:

> Previously in alt.html, Roy Schestowitz <>
> said:
>> Mark Parnell wrote:

>
> [Resizing images]
>>> Even a basic image editing program should be able to handle that.

>>
>> Although it is not a perfect analogy, it is similar to saying "I can make
>> this Web page in Word and it looks okay on my computer".

>
> Your original request bears more similarity to that analogy than my
> answer does.


I read the original message again. I struggle to see how it is so, but like
I already said, it was not a good analogy. It's the use of a program that
is not ideal for the job...

>> I want to use the
>> powers of HTML/CSS rather than editing images.

>
> It's like saying you want to display the image with a yellow background
> instead of blue using HTML and CSS. The height and width of an image are
> an intrinsic part of the image itself, and thus are best changed in a
> program designed for that purpose.


One could argue that a better environment should intergrate Web design with
graphical design.

>>> Yes, but resizing images in HTML is a bad idea anyway. Use a proper
>>> image editor.

>>
>> But that's done off-line.

>
> Well not necessarily, but in most cases it is, yes.
>
>> What if I want to have one image displayed in two
>> different forms (sizes)

>
> Upload 2 copies of the image in different sizes.
>
>> without duplicating?

>
> You only upload the smaller one and put up with the ugly enlargement. Or
> you only upload the larger one, and anyone on dialup will hate you
> because they have to download the larger file, even if they are only
> looking at the smaller one.


Good point. I might try that.

--
Roy S. Schestowitz
http://Schestowitz.com
 
Reply With Quote
 
Mark Parnell
Guest
Posts: n/a
 
      04-21-2005
Previously in alt.html, Roy Schestowitz <>
said:
> Mark Parnell wrote:
>
>> You only upload the smaller one and put up with the ugly enlargement. Or
>> you only upload the larger one, and anyone on dialup will hate you
>> because they have to download the larger file, even if they are only
>> looking at the smaller one.

>
> Good point. I might try that.


<sigh> The point was *not* to do that. Neither option is a good one. The
best option is to change the image itself. There are various automated
tools available if you have a large number of images you don't want to
do manually.

--
Mark Parnell
http://www.clarkecomputers.com.au
alt.html FAQ :: http://html-faq.com/
 
Reply With Quote
 
Sentient Fluid
Guest
Posts: n/a
 
      04-21-2005
Roy Schestowitz wrote:
> Mark Parnell wrote:
>
>
>>Previously in alt.html, Roy Schestowitz <>
>>said:
>>
>>
>>>I have been been searching the Web, trying to find a way of resizing
>>>images while retaining the original aspect ratio.

>>
>>Even a basic image editing program should be able to handle that.

>
>
>
> Although it is not a perfect analogy, it is similar to saying "I can make
> this Web page in Word and it looks okay on my computer". I want to use the
> powers of HTML/CSS rather than editing images.
>
>
>
>>>I know I can use 'height' and
>>>'width', but finding out the necessary values for many images is
>>>laborious.

>>
>>Yes, but resizing images in HTML is a bad idea anyway. Use a proper
>>image editor.

>
>
> But that's done off-line. What if I want to have one image displayed in two
> different forms (sizes) without duplicating? Also, resizing in the usual
> way involves no smoothing.
>
> Roy
>


If you want to have two different sized images, use the smaller one to
link to another page that contains the larger one. Use text to explain
that clicking the image will load a larger file. That way anyone who
doesn't want to waste the bandwidth doesn't end up downloading the
larger one.

Or use text links that point to each one. Then the person viewing the
page can choose which to see.

Maybe provide a much smaller thumbnail on the first page with the two
links below them as below:
______
| |
| |
| |
| |
|______|
Link to small image
Link to large image

~Senti
 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      04-21-2005
Roy Schestowitz wrote:

> One could argue that a better environment should intergrate Web design with
> graphical design.


Why? Why not integrate a web design tool with a relational database
management system instead? Or with a document version management tool?
Either would make just as much sense.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
Hywel Jenkins
Guest
Posts: n/a
 
      04-21-2005
In article <d47all$2oe9$>,
says...
> I have been been searching the Web, trying to find a way of resizing images
> while retaining the original aspect ratio. I know I can use 'height' and
> 'width', but finding out the necessary values for many images is laborious.
> Is there an equivalent (with or without CSS) to 'scale' in LaTeX? For
> example <img scale="80%" src="myimage" />?
>
> Thanks in advance,


Do it with the appropriate software. Here's why: if you image is
600x600 pixels and weighs 200k, "scaling" it in HTML or CSS will simply
result in the download of a 600x600 pixel, 200k image being displayed
poorly. The poor sucker at the end of the line still has to download
the image at full size.

--
Hywel
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
putting img above/bellow img ? Jopek HTML 7 04-26-2009 10:26 PM
how to replace this like <img width=100 ...> with <img width="100" ...> zhanye815@gmail.com Perl Misc 7 06-21-2006 11:16 PM
Problem: <img></img> Philipp Lenssen XML 15 07-03-2005 09:23 AM
how to download img from html img tag news.austin.rr.com ASP .Net 2 04-27-2005 06:25 PM
Control Scaling??? =?Utf-8?B?REVXcmlnaHRfQ0E=?= ASP .Net 1 04-27-2005 03:19 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57