473,385 Members | 1,409 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,385 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 2070
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.