LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 09-04-2020, 04:54 AM   #1
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,318
Blog Entries: 3

Rep: Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723
Images shown rotated correctly in Gimp but not Chromium or Firefox


I have a bunch of thumbnail images created from images taken with a digital camera, most are in landscape orientation but some are in portrait orientation. Since this spring, both Firefox and Chromium fail to show the portrait mode images correctly and instead smushes them into landscape mode thus with severe distortions.

Each thumbnail was created by convert from ImageMagick. The portrait mode images get rotated clockwise or counterclockwise:

Code:
convert "$jpeg" -rotate -90 -resize x256 "t_$jpeg";
Maybe that is where the error lies, but Gimp shows these generated, portait mode thumbnails in correct orientation so I am at a loss as to what to modify so that Chromium and Firefox will show them correctly. Is there a way to do that without having to regenerate each and every thumbnail?
 
Old 09-04-2020, 07:43 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
Hi

Pictures with rotation from the gravity sensors are confusing. Some respect the rotation, others ignore it.

Jhead is a good tool for fixing it. Usually this fixes everything:

jhead -autorot *.jpg

From "man jhead":

Quote:
-autorot
Using the 'Orientation' tag of the Exif header, rotate the image so that it is upright. The program jpegtran is used to perform the rotation. This program is present in most Linux distributions. For windows, you
need to get a copy of it. After rotation, the orientation tag of the Exif header is set to '1' (normal orientation). The thumbnail is also rotated. Other fields of the Exif header, including dimensions are un‐
touched, but the JPEG height/width are adjusted. This feature is especially useful with newer Canon cameras, that set the orientation tag automatically using a gravity sensor.

-norot Clears the rotation field in the Exif header without altering the image. Useful if the images were previously rotated without clearing the Exif rotation tag, as some image browsers will auto rotate images when the
rotation tag is set. Sometimes, thumbnails and rotation tags can get very out of sync from manipulation with various tools. To reset it all use -norot with -rgt to clear this out.
 
1 members found this post helpful.
Old 09-05-2020, 06:49 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
There seems to be some confusion between physical rotation of the image (i.e. changing the jpg data) and exif rotation (just add a tag that says "rotated").
I suspect GIMP is more interested in the physical rotation.
What I'd do:
- remove exif info
- see how images are rotated now. It should be identical between GIMP/browser.
- if need be, physically rotate images
 
  


Reply

Tags
jpeg



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
images not shown correctly firefox, chrone Linux Mint 17.3 mate phovos Linux - Software 2 01-03-2016 06:09 AM
[SOLVED] Storing a rotated picture works in Cinnamon, but not in Mate. tvannee Linux - Newbie 13 07-19-2014 01:03 AM
usb keyboard identified and events shown but key character not shown on the prompt flyxtop Linux - Software 0 11-30-2013 07:45 AM
LXer: GIMP Painter And GIMP Paint Studio Transform GIMP Into The Ultimate Painting Tool LXer Syndicated Linux News 0 02-08-2011 05:40 PM
gimp (1.3.21) and gimp-perl - need help installing gimp-perl keex Slackware 0 10-22-2003 03:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 08:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration