Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

image swap, with different sized images

Status
Not open for further replies.

fuli42

Technical User
Jul 9, 2002
74
HU
I would like to do an imageswap, but the image that would replace the original has different dimensions.
How do you change aside from the src of the image, its height, and width.
Thank you
Fuli42
 
Thank you!

I could do that, but that would mean a lot of extra work. Also the pictures are in jpg format, and the that would create some "jagginess" on the background color. THey had to be in gif, so that the edges remain clear.
But I suspect, that just as you can change the src property of an image, you can change its width/heigth as well.

Fuli
 
No, in fact, if i didn't correct the dimensions of the new image, it would be distorted.
On Explorer you can just insert an image and not specify any dimensions, and the new image is inserted with is own proportions.
On opera for example, if you replace an image with a new one, the new image inherits the dimensions of the previous image. And if the new image doesn't have the same dimensions it would be distorted.
 
THank you!

Yes this is what I was looking for! It should work now...

THanks

Fuli
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top