473,396 Members | 2,108 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Rotating images and different image dimensions

I am rotating images at one location of my web site. My problem is if
I set the width and height of the new image before I show the new
image, the old image is stretched first to the new image dimensions,
and if I show the new image before setting its dimensions, the new
image is stretched first to the old image dimension before it is
adjusted to its own dimension.
I would like to load a new image with its own dimension at the same
time. How can I do this?
thank you
John
Jul 23 '05 #1
5 2072
Ivo

"John" wrote
I am rotating images at one location of my web site. My problem is if
I set the width and height of the new image before I show the new
image, the old image is stretched first to the new image dimensions,

<snip>
Can we see your current code (only the relevant bits, but all of them, and
not exceeding 72(?) characters per line, with some indentation and perhaps a
few well-chosen whitelines)? If not, any suggestion we make is as much to
the point as anything you can read at dynamicdrive.com.

The magic word is preload.
HTH
Ivo
Jul 23 '05 #2
Lee
John said:

I am rotating images at one location of my web site. My problem is if
I set the width and height of the new image before I show the new
image, the old image is stretched first to the new image dimensions,
and if I show the new image before setting its dimensions, the new
image is stretched first to the old image dimension before it is
adjusted to its own dimension.
I would like to load a new image with its own dimension at the same
time. How can I do this?


Off the top of my head:

1. change the image to something amorphous, change the dimensions,
then change to your new image. The intermediate image could be
a solid color (white?) or it could be some sort of swirl to give
the impression of an image being rotated.

2. change the visibility of the image to hidden, update it, then
set it back to visible.

3. rewrite the entire <img> tag with the new image and dimensions.

Do all popular browsers allow you to change the dimensions of images
on the fly these days? Some older ones wouldn't allow that.


Do most current browsers allow you to change the dimensions of an
image after it's been rendered? Some older browsers won't.

Jul 23 '05 #3
Lee <RE**************@cox.net> wrote in message news:<c9*********@drn.newsguy.com>...
John said:

I am rotating images at one location of my web site. My problem is if
I set the width and height of the new image before I show the new
image, the old image is stretched first to the new image dimensions,
and if I show the new image before setting its dimensions, the new
image is stretched first to the old image dimension before it is
adjusted to its own dimension.
I would like to load a new image with its own dimension at the same
time. How can I do this?


Off the top of my head:

1. change the image to something amorphous, change the dimensions,
then change to your new image. The intermediate image could be
a solid color (white?) or it could be some sort of swirl to give
the impression of an image being rotated.

2. change the visibility of the image to hidden, update it, then
set it back to visible.

3. rewrite the entire <img> tag with the new image and dimensions.

Do all popular browsers allow you to change the dimensions of images
on the fly these days? Some older ones wouldn't allow that.


Do most current browsers allow you to change the dimensions of an
image after it's been rendered? Some older browsers won't.

I have tried changing the visibility to hidden and then back to
visible but its not working. I don't know how to make a swirl, but I
would prefer not to have effects. I am firing the event onmouseover to
show the images so I don't think its possible to write the <img> tag,
but I would welcome your suggestion of how I can do it.

thank you
Jul 23 '05 #4
jo******@fastermail.com (John) wrote in message news:<1a*************************@posting.google.c om>...
Lee <RE**************@cox.net> wrote in message news:<c9*********@drn.newsguy.com>...
John said:

I am rotating images at one location of my web site. My problem is if
I set the width and height of the new image before I show the new
image, the old image is stretched first to the new image dimensions,
and if I show the new image before setting its dimensions, the new
image is stretched first to the old image dimension before it is
adjusted to its own dimension.
I would like to load a new image with its own dimension at the same
time. How can I do this?


Off the top of my head:

1. change the image to something amorphous, change the dimensions,
then change to your new image. The intermediate image could be
a solid color (white?) or it could be some sort of swirl to give
the impression of an image being rotated.

2. change the visibility of the image to hidden, update it, then
set it back to visible.

3. rewrite the entire <img> tag with the new image and dimensions.

Do all popular browsers allow you to change the dimensions of images
on the fly these days? Some older ones wouldn't allow that.


Do most current browsers allow you to change the dimensions of an
image after it's been rendered? Some older browsers won't.

I have tried changing the visibility to hidden and then back to
visible but its not working. I don't know how to make a swirl, but I
would prefer not to have effects. I am firing the event onmouseover to
show the images so I don't think its possible to write the <img> tag,
but I would welcome your suggestion of how I can do it.

thank you

Is there someone out there who can help me with this problem?

John
Jul 23 '05 #5
>Is there someone out there who can help me with this problem?

Have you tried loading a transparent gif image before loading the new picture?
Sort of like a buffer image that you can resize.

Have you tried not setting the height and width of the IMG tag?

Peace, Vm
Yaz

Providing complicated solutions to simple problems since 1997.
Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ian Hubling | last post by:
I'm trying to complete a rotating banner ad within a page I have. The rotating add has four images that rotate in three-second increments. I've got the images to rotate ok - but now I want to go...
1
by: Sandy Bremmer | last post by:
I have seen many Javascripts that rotate images with each load or refresh of the page but so far all I've found require hard coding the image filename into the script. Does anyone know of a script...
1
by: Grunt | last post by:
Hi, I have been trying to put together a rotating banner. the code works but I am having a problem with the caching of the banner images. no matter what I try the page is constantly reloading the...
14
by: mikeoley | last post by:
Why would this script below work on an html page: http://www.eg-designdev.com/aircylinders/test.htm But not a java page such as this: "http://www.eg-designdev.com/aircylinders/index3.jsp" Or...
2
by: sgMuser | last post by:
Hi, I am not a good developer of Javascript codes. Needs this help to make some modification to this famous free javascript from Anarchos. i am using this in one of my webpage. What it does is,...
5
by: Ricardo Furtado | last post by:
I'm trying, for a week or two, to create a procedure in order to rotate the image in any picturebox control in a cephalometry software. I've found a web site that shows how that can be done:...
5
by: Michael | last post by:
Hello all, how could I rotate a server side image in asp.net and show it in web page? Thanks.
3
by: =?Utf-8?B?UiBSZXllcw==?= | last post by:
Hi! This discussion may help other programmers get a better idea of how to save uploaded images through a website. Why? Well currently, I save 3 versions of every uploaded image on my own...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.