Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Rotate an image?

Reply
Thread Tools

Rotate an image?

 
 
Martin
Guest
Posts: n/a
 
      09-23-2004
Is it possible to display an image (a .gif or a .jpg or a .png) such
that it is rotated some specified number of degrees? Or does the image
itself have to be modified?
 
Reply With Quote
 
 
 
 
Dylan Parry
Guest
Posts: n/a
 
      09-23-2004
Spake Martin unto thee:

> Is it possible to display an image (a .gif or a .jpg or a .png) such
> that it is rotated some specified number of degrees? Or does the image
> itself have to be modified?


With HTML, no. You could do it with some server side programming, but it
would be easier to do it yourself using your favourite image editor.

--
Dylan Parry
http://webpageworkshop.co.uk - FREE Web tutorials and references
 
Reply With Quote
 
 
 
 
Martin
Guest
Posts: n/a
 
      09-23-2004
On Thu, 23 Sep 2004 14:16:42 +0100, Dylan Parry
<> wrote:

>> Is it possible to display an image (a .gif or a .jpg or a .png) such
>> that it is rotated some specified number of degrees? Or does the image
>> itself have to be modified?

>
>With HTML, no. You could do it with some server side programming, but it
>would be easier to do it yourself using your favourite image editor.


Actually, some server-side programming is already being used in the
situation I'm taking about. The page in question here is being
generated by a PHP script. But, the only way I can see to rotate the
image is by actually modifying the image - and I'm having some
problems with that. Thus, my question.

Do I understand you to mean that with some server-side programming the
image could be displayed at an angle without actually modifying the
image?
 
Reply With Quote
 
Dylan Parry
Guest
Posts: n/a
 
      09-23-2004
Spake Martin unto thee:

> Do I understand you to mean that with some server-side programming the
> image could be displayed at an angle without actually modifying the
> image?


Yes, although I've not done what you want specifically, it is possible for
PHP to send back an image header (eg. image/jpeg) and open up an existing
image to base its content on. You should be able to find some tutorials
showing how to do this.

In order to use the image you would simply refer to the PHP file in the
image element (eg. <img src="image.php" ... />). You could then pass
variables to the PHP to specify the angle of rotation and the actual base
image to use.

Again, I couldn't tell you the exact code to use as I haven't done this
before, but a search should find you enough info to get started. Of
course, as I said earlier, it might be less hassle to do it manually

--
Dylan Parry
http://webpageworkshop.co.uk - FREE Web tutorials and references
 
Reply With Quote
 
SpaceGirl
Guest
Posts: n/a
 
      09-23-2004
Martin wrote:
> Is it possible to display an image (a .gif or a .jpg or a .png) such
> that it is rotated some specified number of degrees? Or does the image
> itself have to be modified?


Yes. Stick it in Flash You have complete programmatic control over
every property of the image then.

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
Reply With Quote
 
Dylan Parry
Guest
Posts: n/a
 
      09-23-2004
Spake SpaceGirl unto thee:

> Yes. Stick it in Flash You have complete programmatic control over
> every property of the image then.


So you are suggesting the OP change from using a file type that every
graphical browser can display without having any external plugin, to using
a format that is proprietary and won't work in any browser without a
plugin? :\

--
Dylan Parry
http://webpageworkshop.co.uk - FREE Web tutorials and references
 
Reply With Quote
 
Martin
Guest
Posts: n/a
 
      09-23-2004
On Thu, 23 Sep 2004 14:44:39 +0100, Dylan Parry
<> wrote:

>Spake Martin unto thee:
>
>> Do I understand you to mean that with some server-side programming the
>> image could be displayed at an angle without actually modifying the
>> image?

>
>Yes, although I've not done what you want specifically, it is possible for
>PHP to send back an image header (eg. image/jpeg) and open up an existing
>image to base its content on. You should be able to find some tutorials
>showing how to do this.
>
>In order to use the image you would simply refer to the PHP file in the
>image element (eg. <img src="image.php" ... />). You could then pass
>variables to the PHP to specify the angle of rotation and the actual base
>image to use.
>
>Again, I couldn't tell you the exact code to use as I haven't done this
>before, but a search should find you enough info to get started. Of
>course, as I said earlier, it might be less hassle to do it manually



Thanks for the tip - I'll see what I can find out.
 
Reply With Quote
 
SpaceGirl
Guest
Posts: n/a
 
      09-23-2004
Dylan Parry wrote:
> Spake SpaceGirl unto thee:
>
>
>>Yes. Stick it in Flash You have complete programmatic control over
>>every property of the image then.

>
>
> So you are suggesting the OP change from using a file type that every
> graphical browser can display without having any external plugin, to using
> a format that is proprietary and won't work in any browser without a
> plugin? :\
>


No... I was just offering one solution. 90% of machines have Flash
installed (probably as many people who have JS enabled) so it was a fair
suggestion

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
 
Reply With Quote
 
Default User
Guest
Posts: n/a
 
      09-23-2004
Dylan Parry wrote:

[image rotation with PHP]

> Again, I couldn't tell you the exact code to use as I haven't done
> this before, but a search should find you enough info to get started.
> Of course, as I said earlier, it might be less hassle to do it
> manually


I'd recommend the newsgroup comp.lang.php for heavy-duty questions.



Brian
 
Reply With Quote
 
Martin
Guest
Posts: n/a
 
      09-23-2004
On Thu, 23 Sep 2004 16:02:43 GMT, "Default User"
<> wrote:

>
>I'd recommend the newsgroup comp.lang.php for heavy-duty questions.


Yeah - actually, I've already posted a question there about the
problems I'm having with the "imagerotate" function (which led me to
seeing if there was another way to do this).

I've been googling for the last couple of hours but haven't come up
with much.


 
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
PIL rotate : Rotate By Shear / Paeth Rotation? IanJSparks Python 0 01-10-2008 04:50 PM
Rotate the graphics without rotate the text in SVG RC XML 1 08-03-2006 07:45 AM
XPpro+SP2: Rotate WEP keys remotely? DevilsPGD Wireless Networking 3 11-07-2005 01:44 AM
Rotate by variable Patrick Moore VHDL 18 02-20-2004 04:49 AM
How to rotate image upon upload? Showjumper ASP .Net 7 02-16-2004 12:17 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