Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Rotating images and different image dimensions

Reply
Thread Tools

Rotating images and different image dimensions

 
 
John
Guest
Posts: n/a
 
      05-26-2004
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
 
Reply With Quote
 
 
 
 
Lee
Guest
Posts: n/a
 
      05-26-2004
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.

 
Reply With Quote
 
 
 
 
Ivo
Guest
Posts: n/a
 
      05-26-2004

"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


 
Reply With Quote
 
John
Guest
Posts: n/a
 
      05-27-2004
Lee <> wrote in message news:<>...
> 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
 
Reply With Quote
 
John
Guest
Posts: n/a
 
      06-01-2004
(John) wrote in message news:< om>...
> Lee <> wrote in message news:<>...
> > 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
 
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
Rotating Images Before Burning to CD None Digital Photography 4 02-04-2004 06:43 PM
Rotating Images Before Burning to CD None Digital Photography 1 02-04-2004 08:13 AM
Rotating Images Before Burning to CD None Digital Photography 0 02-04-2004 01:07 AM
Best program for rotating and saving hi res images? Louise Digital Photography 15 01-30-2004 02:05 AM
Rotating images. Gav Digital Photography 11 01-27-2004 08:45 AM



Advertisments