The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> picture displaying wrong orientation
Joe M
post Jul 8 2017, 01:00 PM
Post #1





Group: Members
Posts: 4
Joined: 18-September 15
Member No.: 23,548



Very simple notepad hand written web page:

http://www.missilecommand.org/Space_Duel2/Space_Duel_2.html

I have it set up where is someone clicks on any picture, it brings up a higher resolution pic.

Problem is the 6th picture (entitled "Marquee back".). If you click on the picture, it displays it in a vertical orientation.

I've posted hundreds of pictures with this html code before and I've never encountered this before. When I open the picture on my PC (via Windows Explorer), it opens it as it should as horizontal. What is going on here? How do I correct this?

The dimensions in Windows Explorer show it as 2272 x 1704, indicating it is a horizontal picture. The html code is rotating it. Can't figure it out.

Thanks in advance.

Joe (joemagiera at ameritech dot net
joemagiera@ameritech.net
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 8 2017, 03:26 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,630
Joined: 10-August 06
Member No.: 7



QUOTE(Joe M @ Jul 8 2017, 08:00 PM) *

When I open the picture on my PC (via Windows Explorer), it opens it as it should as horizontal.

In which device does it open vertically, a smartphone?

QUOTE
What is going on here? How do I correct this?

Nothing on the page is causing this, so I suspect your smartphone is rotating the image to make fit the screen better.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 9 2017, 06:58 PM
Post #3


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



I see it too, on my desktop. K-Mel, Firefox, Chrome. If I copy the image and paste it into an image editor it displays correctly in IrfanView, but not in my more advanced editor. Same if I save the image. OK in Irfan, but wrong in everything else.

I guess there's something wrong with the embedded orientation information in the image file. Why Irfan gets it right I don't know. Suggestion: open the image in another editor than the one you used earlier, turn it right if needed and save it again.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Joe M
post Jul 9 2017, 07:40 PM
Post #4





Group: Members
Posts: 4
Joined: 18-September 15
Member No.: 23,548



>>When I open the picture on my PC (via Windows Explorer), it opens it as it should as horizontal.

>In which device does it open vertically, a smartphone?

It's just my desktop PC (Windows XP). The same machine where is shows correctly in Windows Explorer.

Is there anyway to force this to horizontal using the Height and Width parameters on the "A HREF"?

This post has been edited by Joe M: Jul 9 2017, 07:42 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 9 2017, 08:14 PM
Post #5


.
********

Group: WDG Moderators
Posts: 9,630
Joined: 10-August 06
Member No.: 7



QUOTE(Joe M @ Jul 10 2017, 02:40 AM) *

It's just my desktop PC (Windows XP). The same machine where is shows correctly in Windows Explorer.

In that case it might be something wrong with the image file, like pandy wrote.

QUOTE
Is there anyway to force this to horizontal using the Height and Width parameters on the "A HREF"?

Not with HTML. There are some tricks with CSS, but if the image file itself is broken I don't know what the result would be.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 10 2017, 02:58 AM
Post #6


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



CSS sounds risky. The image-orientation property can rotate the image, but it uses the image orientation information in the image file as a starting point - what else is there? So if there is a browser that gets it right (although it's probably wrong...) to start with it will show the image with the wrong orientation after the CSS treatment. It's always better to fix the problem than to try to mend it. In this case use an image file without errors.

Did you look in a desktop browser that got it right, Christian? If so which?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 10 2017, 06:37 AM
Post #7


.
********

Group: WDG Moderators
Posts: 9,630
Joined: 10-August 06
Member No.: 7



Opera12, IE11 and Edge get it right. Vivaldi and Firefox rotate.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Joe M
post Jul 10 2017, 05:08 PM
Post #8





Group: Members
Posts: 4
Joined: 18-September 15
Member No.: 23,548



I appreciate the help and replies. I'm glad to hear it doesn't appear to be an html coding problem.

It's not that big a deal. The image itself being wrong does give some explanation.

I'll just live with it as is I guess. Thanks again.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jul 10 2017, 05:35 PM
Post #9


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Why? Just re-save it with another program.

BTW, just discovered that my other editor (Picture Window Pro) shows the image with the intended orientation if I copy it form the web and paste it in. But not when I save the image to my hard drive and open it the normal way.

Which leads me to wonder... Yes, Irfan also shows the not intended orientation when I open the saved image. So it's the Windows clipboard that somehow makes it right. Go figure. ohmy.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Joe M
post Jul 10 2017, 07:19 PM
Post #10





Group: Members
Posts: 4
Joined: 18-September 15
Member No.: 23,548



QUOTE(pandy @ Jul 10 2017, 05:35 PM) *

Why? Just re-save it with another program.


Doh! Thanks for the tip!

I opened it with Windows Picture and Fax Viewer. I rotated it 90 degrees and then rotated it back 90 degrees and saved it. It worked!

Thanks much!

Joe
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 05:07 PM