搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

How can I rotate a jpg file without saving it first

  • 1 回覆
  • 1 有這個問題
  • 1 次檢視
  • 最近回覆由 cor-el

more options

I frequently have to view student's work uploaded as jpg files, and often they have uploaded the file sideways or upside down. Is there a way to rotate the file without saving it to my computer first (like we can with a pdf file)

I frequently have to view student's work uploaded as jpg files, and often they have uploaded the file sideways or upside down. Is there a way to rotate the file without saving it to my computer first (like we can with a pdf file)

所有回覆 (1)

more options

It is possible to rotate the image via CSS with img {-moz-transform: rotate(90deg);} (90deg, -90deg, 180deg) if you open the image in a tab via the right-click context menu (middle-click View Image).

You can do that with bookmarklets like these (doesn't work via the location, but does via the Scratchpad, Shift+F4):


javascript:(function(){var doc=document,css=doc.createElement('LINK');css.rel='stylesheet';css.type='text/css';css.href='data:text/css,img {-moz-transform: rotate(90deg);}';doc.documentElement.childNodes[0].appendChild(css);})();

javascript:(function(){var doc=document,css=doc.createElement('LINK');css.rel='stylesheet';css.type='text/css';css.href='data:text/css,img {-moz-transform: rotate(-90deg);}';doc.documentElement.childNodes[0].appendChild(css);})();

由 cor-el 於 修改