Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Linux, Imagemagick, identify et rotate farceur...

9 réponses
Avatar
Dominique
Bonjour,

http://cjoint.com/?CDomv5Q5Epu

J'utilise Imagemagick pour caractériser cette photo prise en mode portrait :

identify -verbose 20130413_161432.jpg
...
Geometry: 3264x2448+0+0
...
Orientation: RightTop

Pour la réduire et la mettre verticale (Gwenview tient compte de
l'orientation de la photo. Toutes les applications ne le font pas), je
passe :

convert -verbose -rotate 90 -geometry 800 20130413_161432.jpg musee.jpeg
&& gwenview musee.jpeg

J'ai bien ma réduction mais rien pour l'orientation :

identify -verbose musee.jpeg | grep Orientation

Orientation: RightTop

Avec 90, 180, 270 et les mêmes en négatif, ma photo tourne en rond mais
pas moyen de l'avoir verticale dans Gwenview...

Alors, comment faire pour avoir ma photo correctement orientée « en dur » ?

Merci pour votre aide et bonne journée,

--
Dominique
Courriel : dominique point sextant ate orange en France
Esto quod es

9 réponses

Avatar
Jacques DASSIÉ
Dominique a exposé le 14/04/2013 :
Bonjour,


Salut,

http://cjoint.com/?CDomv5Q5Epu

Alors, comment faire pour avoir ma photo correctement orientée « en dur » ?



Je ne sais pas si je vais beaucoup t'aider:

- Ta photo s'ouvre bien en grand paysage en cliquant sur le lien.

- Je l'enregistre (clic droit) sur le disque dur.

- Je l'ouvre avec XnView : impec. Portrait de 2448 x 3264 pix et 750
Ko.

- Je l'enregistre sous XnView. Relecture avec différents programmes
graphiques : toujours impec, mode portrait.

--
Jacques DASSIÉ
http://archaero.com/
Avatar
ST
On 2013-04-14, Jacques DASSIÉ wrote:
http://cjoint.com/?CDomv5Q5Epu
Alors, comment faire pour avoir ma photo correctement orientée « en dur » ?



Je ne sais pas si je vais beaucoup t'aider:
- Ta photo s'ouvre bien en grand paysage en cliquant sur le lien.
- Je l'enregistre (clic droit) sur le disque dur.
- Je l'ouvre avec XnView : impec. Portrait de 2448 x 3264 pix et 750
Ko.
- Je l'enregistre sous XnView. Relecture avec différents programmes
graphiques : toujours impec, mode portrait.



Chez moi aussi, cela s'ouvre correctement, mais je suis pas sur de la
valeur de l'Exif 'Image Orientation'.

D'après les exif

'Image Orientation' => 'Right-Hand, Top',

Plus d'info sur comment lire cela:
http://sylvana.net/jpegcrop/exif_orientation.html

Comment lire les exifs en Perl :

#!/opt/local/bin/erl

use strict;
use Image::EXIF;
use Data::Dumper;

my $exif = Image::EXIF->new($ARGV[0]);

my $all = $exif -> get_all_info();

print Dumper $all;
Avatar
Pierre Maurette
Dominique :
Bonjour,

http://cjoint.com/?CDomv5Q5Epu

J'utilise Imagemagick pour caractériser cette photo prise en mode portrait :

identify -verbose 20130413_161432.jpg
...
Geometry: 3264x2448+0+0
...
Orientation: RightTop

Pour la réduire et la mettre verticale (Gwenview tient compte de
l'orientation de la photo. Toutes les applications ne le font pas), je passe
:

convert -verbose -rotate 90 -geometry 800 20130413_161432.jpg musee.jpeg &&
gwenview musee.jpeg

J'ai bien ma réduction mais rien pour l'orientation :

identify -verbose musee.jpeg | grep Orientation

Orientation: RightTop

Avec 90, 180, 270 et les mêmes en négatif, ma photo tourne en rond mais pas
moyen de l'avoir verticale dans Gwenview...

Alors, comment faire pour avoir ma photo correctement orientée « en dur » ?



Je n'utilise pas Linux pour ce genre de manip, et je ne vois pas
exactement ce que vous avez compris de votre problème. Vous devriez
regarder du coté de exifautotran, jpegexiforient et exiftran. Source
Debian, mais ça doit exister ou s'installer facilement sur la majorité
des distros:

exiftran:
exiftran is a command line utility to transform digital image jpeg
images. It can do lossless rotations like jpegtran, but unlike jpegtran
it cares about the EXIF data: It can rotate images automatically by
checking the exif orientation tag, it updates the exif informaton if
needed (image dimension, orientation), it also
rotates the exif thumbnail. It can process multiple images at once.

libjpeg-progs:
This package contains programs for manipulating JPEG files:
- cjpeg/djpeg: convert to/from the JPEG file format
- rdjpgcom/wrjpgcom: read/write comments in JPEG files
- jpegtran: lossless transformations of JPEG files
- jpegexiforient/exifautotran: manipulate EXIF orientation tag

--
Pierre Maurette
Avatar
jdd
Le 14/04/2013 12:24, Dominique a écrit :

Alors, comment faire pour avoir ma photo correctement orientée « en dur » ?



j'ai pratiquement renoncé à ce genre de manip. Le résultat est trop
aléatoire. Une partie des logiciels oriente la photo conformant au tag,
d'autres non, d'autres regardent visiblement aussi le rapport L/l, bref
entre le/les logiciels utilisés pour orienter la photo et les éditeurs
sensés la modifier c'est la loterie...

mes images sont en général bien orientées, et de temps en temps non,
tant pis...

jdd
Avatar
Ghost-Rider
Le 14/04/2013 12:24, Dominique a écrit :

http://cjoint.com/?CDomv5Q5Epu
J'utilise Imagemagick pour caractériser cette photo prise en mode
portrait :
identify -verbose 20130413_161432.jpg
...
Geometry: 3264x2448+0+0
...
Orientation: RightTop
Pour la réduire et la mettre verticale (Gwenview tient compte de
l'orientation de la photo. Toutes les applications ne le font pas), je
passe :
convert -verbose -rotate 90 -geometry 800 20130413_161432.jpg musee.jpeg
&& gwenview musee.jpeg
J'ai bien ma réduction mais rien pour l'orientation :
identify -verbose musee.jpeg | grep Orientation
Orientation: RightTop
Avec 90, 180, 270 et les mêmes en négatif, ma photo tourne en rond mais
pas moyen de l'avoir verticale dans Gwenview...
Alors, comment faire pour avoir ma photo correctement orientée « en dur » ?



Ta photo est affichée couchée dans mon navigateur, enregistrée sur mon
disque et visionnée par l'explorer Windows elle est toujours couchée
mais visionnée dans Picasa, elle se remet debout.
Picasa interprète sans erreur les tags d'orientation, quels qu'ils soient.
Hors Picasa, point de salut !
Avatar
Dominique
Le 14/04/2013 19:55, Pierre Maurette a écrit :

exiftran:



Il semble y avoir des choses intéressantes. J'ai rencontré des erreurs
dans les fichiers jpeg en sortie.

Je vais fouiller un peu. Merci


--
Dominique
Courriel : dominique point sextant ate orange en France
Esto quod es
Avatar
René
"Dominique" a écrit dans le message de groupe de discussion :
kke05k$r4f$

Bonjour,

http://cjoint.com/?CDomv5Q5Epu

J'utilise Imagemagick pour caractériser cette photo prise en mode portrait
:

identify -verbose 20130413_161432.jpg
...
Geometry: 3264x2448+0+0
...
Orientation: RightTop


.....

Tout ceci est bien compliqué...

Qu'importe, voici ce qui se passe chez moi: Google Chrome affiche l'image en
paysage. IE 9 aussi.
Je redresse avec n'importe quel logiciel et pas la suite j'ai toujours la
photo en portrait.

Voici ci-dessous les infos données par Jeffrey's Exif Viewer dans Chrome.
Remarquer la dernière ligne:
ExifTool
Warning Invalid EXIF text encoding

René
____________________________________

Camera: Samsung GT-I9300
Lens: 3.7 mm
(Max aperture f/2.6)
Exposure: Auto exposure, Aperture-priority AE, 1/17 sec, f/2.6, ISO 320
Flash: none
Date: April 13, 2013 4:14:32PM (timezone not specified)
(1 day, 6 hours, 59 minutes, 26 seconds ago, assuming image timezone of US
Pacific)
File: 2,448 × 3,264 JPEG (8.0 megapixels)
2,036,801 bytes (1.9 megabytes) Image compression: 92%
Color Encoding:
WARNING: Color space tagged as sRGB, without an embedded color profile.
Windows and Mac browsers and apps treat the colors randomly.
Images for the web are most widly viewable when in the sRGB color space and
with an embedded color profile. See my Introduction to Digital-Image Color
Spaces for more information.
Image URL: http://cjoint.com/13av/CDomv5Q5Epu_20130413_161432.jpg
Apply other tools to this image via ImgOps.com.

Extracted 160 × 120 9.9-kilobyte “Composite:ThumbnailImage” JPG
Displayed here at 200% (1/104 the area of the original)

Click image to isolate; click this text to show histogram
Main image displayed here at 14% width (1/53 the area of the original)

Click image to isolate; click this text to show histogram

Here's the full data:

EXIF — this group of metadata is encoded in 15,144 bytes (14.8k)
Make SAMSUNG
Camera Model Name GT-I9300
Software I9300XXELLA
Modify Date 2013:04:13 16:14:32
1 day, 6 hours, 59 minutes, 26 seconds ago
Y Cb Cr Positioning Centered
Exposure Time 1/17
F Number 2.60
Exposure Program Aperture-priority AE
ISO 320
Exif Version 0220
Date/Time Original 2013:04:13 16:14:32
1 day, 6 hours, 59 minutes, 26 seconds ago
Create Date 2013:04:13 16:14:32
1 day, 6 hours, 59 minutes, 26 seconds ago
Components Configuration Y, Cb, Cr, -
Shutter Speed Value 1/17
Aperture Value 2.60
Brightness Value 0
Exposure Compensation 0
Max Aperture Value 2.6
Metering Mode Center-weighted average
Flash No Flash
Focal Length 3.7 mm
Image Size 3,264 × 2,448
Maker Note Samsung 2 (98 bytes binary data)
User Comment (4,096 bytes binary data)
Flashpix Version 0100
Color Space sRGB
Interoperability Index R98 - DCF basic file (sRGB)
Interoperability Version 0100
Exposure Mode Auto
White Balance Auto
Scene Capture Type Standard
Image Unique ID GDFI02
Image Width 160
Image Height 120
Compression JPEG (old-style)
Orientation Rotate 90 CW
Resolution 72 pixels/inch
Thumbnail Length 10,098
MakerNotes
Maker Note Version 0100
Samsung Type 2 0x0002 73,728
Samsung Type 2 0x0040 0
Samsung Type 2 0x0050 1
Samsung Type 2 0x0100 0
Samsung Type 2 0x000c 0
Samsung Type 2 0x0010 undef
File — basic information derived from the file.
File Type JPEG
MIME Type image/jpeg
Exif Byte Order Little-endian (Intel, II)
Encoding Process Baseline DCT, Huffman coding
Bits Per Sample 8
Color Components 3
File Size 1989 kB
Image Size 3,264 × 2,448
Y Cb Cr Sub Sampling YCbCr4:2:2 (2 1)
Composite
This block of data is computed based upon other items. Some of it may be
wildly incorrect, especially if the image has been resized.
Aperture 2.60
Shutter Speed 1/17
Thumbnail Image (10,098 bytes binary data)
Light Value 5.2
Focal Length 3.7 mm
ExifTool
Warning Invalid EXIF text encoding
This application uses Phil Harvey's most excellent Image::ExifTool library,
version 9.25. Histograms created with ImageMagick.
Jeffrey last modifed this viewer on Feb 25, 2013.
Avatar
jp willm
Le 14/04/2013 12:24, Dominique a écrit :
Bonjour,

http://cjoint.com/?CDomv5Q5Epu

J'utilise Imagemagick pour caractériser cette photo prise en mode
portrait :

identify -verbose 20130413_161432.jpg
...
Geometry: 3264x2448+0+0
...
Orientation: RightTop

Pour la réduire et la mettre verticale (Gwenview tient compte de
l'orientation de la photo. Toutes les applications ne le font pas), je
passe :

convert -verbose -rotate 90 -geometry 800 20130413_161432.jpg musee.jpeg
&& gwenview musee.jpeg

J'ai bien ma réduction mais rien pour l'orientation :

identify -verbose musee.jpeg | grep Orientation

Orientation: RightTop

Avec 90, 180, 270 et les mêmes en négatif, ma photo tourne en rond mais
pas moyen de l'avoir verticale dans Gwenview...

Alors, comment faire pour avoir ma photo correctement orientée « en dur » ?



gthumb (outils > pivoter) oriente correctement les images sans perte et
en toute simplicité.

Je l'utilise pour cela et pour certains traitements par lots.


--
http://perso.orange.fr/willms/index.html
Avatar
Dominique
Le 15/04/2013 17:21, jp willm a écrit :

gthumb (outils > pivoter) oriente correctement les images sans perte et
en toute simplicité.



J'ai utilisé gthumb vers 2005 et puis j'ai « oublié » cette application.
Je vais l'installer à nouveau pour voir comment elle a évolué.

Merci et bonne journée,


--
Dominique
Courriel : dominique point sextant ate orange en France
Esto quod es