Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 08/04/2021, à 11:55

michel54

lire un fichier bmp

Bonjour,

Je suis sous Kubuntu 18.04 LTS. Je cherche à ouvrir de vieux fichiers bmp. J'ai parcouru pas mal de forum. Rien ne fonctionne.
Gimp, ImageMgic, ..., ne fonctionnent pas
Quelqu'un aurait-il une idée.
Merci d'avance

Michel

Hors ligne

#2 Le 08/04/2021, à 12:43

Nasman

Re : lire un fichier bmp

Il faudrait voir à quoi ressemble les en-tête de ces fichiers bmp.
L'extension bmp ne signifie pas que ces fichiers ont bien la structure prévue.

On peut vérifier les en-tête avec :
- soit un éditeur hexa (par exemple ghex) ou avec dd

Pour dd tu peux faire un :

sudo dd if=/chemin/vers/ton/fichier bs=512 count=1 | hexdump -C

PC fixe sous Bionic 64 bits et portable avec Focal 64 bits

Hors ligne

#3 Le 10/04/2021, à 11:26

michel54

Re : lire un fichier bmp

Voilà ce que cela donne:

1+0 enregistrements lus
1+0 enregistrements écrits
00000000  01 6f 20 45 96 fe 9c f9  8b ff 3a 2d 5f 1b 40 1b  |.o E......:-_.@.|
512 bytes copied, 6,7572e-05 s, 7,6 MB/s00000010  7a f1 eb c0 6c 0d fa 09  74 cf ab cf 7e 1b 69 0c  |z...l...t...~.i.|

00000020  78 0c a4 c5 a1 c4 51 29  50 3c 83 f5 9c f9 8b ff  |x.....Q)P<......|
00000030  4c 2d 5f 1b 68 1b 82 09  5e c3 9b e1 92 0d 9b 10  |L-_.h...^.......|
00000040  7d cf 9f d7 d7 0c a3 b9  01 c5 70 62 d3 22 96 b3  |}.........pb."..|
00000050  e7 fe 20 85 d6 ff e1 47  15 1b f1 47 3a f1 24 8c  |.. ....G...G:.$.|
00000060  5b 0d 14 4f 59 cf fd fd  59 1b 5f 2c 6c 0c b5 cc  |[..OY...Y._,l...|
00000070  a9 c4 43 22 50 3c 6e 01  63 06 74 00 b3 d2 a0 e4  |..C"P<n.c.t.....|
00000080  97 e4 85 0e 59 3c 93 f2  86 f2 8b 30 55 30 85 e4  |....Y<.....0U0..|
00000090  96 f3 87 f3 5b 3a 5e 3b  bc dd af c3 6e 01 63 06  |....[:^;....n.c.|
000000a0  74 00 b3 d2 a0 e4 97 e4  85 0e 59 3c 93 f2 86 f2  |t.........Y<....|
000000b0  8b 30 55 30 85 e4 96 f3  87 f3 5b 3a 5e 3b bc dd  |.0U0......[:^;..|
000000c0  af c3 6e 01 63 06 74 00  b3 d2 a0 e4 97 e4 85 0e  |..n.c.t.........|
000000d0  59 3c 93 f2 86 f2 8b 30  55 30 85 e4 96 f3 87 f3  |Y<.....0U0......|
000000e0  5b 3a 5e 3b bc dd af c3  6e 01 63 06 74 00 b3 d2  |[:^;....n.c.t...|
000000f0  a0 e4 97 e4 85 0e 59 3c  93 f2 86 f2 8b 30 55 30  |......Y<.....0U0|
00000100  85 e4 96 f3 87 f3 5b 3a  5e 3b bc dd af c3 6e 01  |......[:^;....n.|
00000110  63 06 74 00 b3 d2 a0 e4  97 e4 85 0e 59 3c 93 f2  |c.t.........Y<..|
00000120  86 f2 8b 30 55 30 85 e4  96 f3 87 f3 5b 3a 5e 3b  |...0U0......[:^;|
00000130  bc dd af c3 6e 01 63 06  74 00 b3 d2 a0 e4 97 e4  |....n.c.t.......|
00000140  85 0e 59 3c 93 f2 86 f2  8b 30 55 30 85 e4 96 f3  |..Y<.....0U0....|
00000150  87 f3 5b 3a 5e 3b bc dd  af c3 6e 01 63 06 74 00  |..[:^;....n.c.t.|
00000160  b3 d2 a0 e4 97 e4 85 0e  59 3c 93 f2 86 f2 8b 30  |........Y<.....0|
00000170  55 30 85 e4 96 f3 87 f3  5b 3a 5e 3b bc dd af c3  |U0......[:^;....|
00000180  6e 01 63 06 74 00 b3 d2  a0 e4 97 e4 85 0e 59 3c  |n.c.t.........Y<|
00000190  93 f2 86 f2 8b 30 55 30  85 e4 96 f3 87 f3 5b 3a  |.....0U0......[:|
000001a0  5e 3b bc dd af c3 6e 01  63 06 74 00 b3 d2 a0 e4  |^;....n.c.t.....|
000001b0  97 e4 85 0e 59 3c 93 f2  86 f2 8b 30 55 30 85 e4  |....Y<.....0U0..|
000001c0  96 f3 87 f3 5b 3a 5e 3b  bc dd af c3 6e 01 63 06  |....[:^;....n.c.|
000001d0  74 00 b3 d2 a0 e4 97 e4  85 0e 59 3c 93 f2 86 f2  |t.........Y<....|
000001e0  8b 30 55 30 85 e4 96 f3  87 f3 5b 3a 5e 3b bc dd  |.0U0......[:^;..|
000001f0  af c3 6e 01 63 06 74 00  b3 d2 a0 e4 97 e4 85 0e  |..n.c.t.........|
00000200

Pour les bmp que je désire ouvrir, ils proviennent d'un CD de chez Corbis (M$) de 1996 sur Galilée. Y aurait-il un verrou?

Hors ligne

#4 Le 12/04/2021, à 23:11

Nasman

Re : lire un fichier bmp

Les octets que tu nous donnes ne correspondent pas à un fichier bmp mais on ne peut pas le vérifier faute d'avoir un retour complet de la commande.

Rappel : un retour complet est de la forme :

toto@nom_machine:~$ ma_commande_passée
bla bla bla retour de la commande
toto@nom_machine:~$

PC fixe sous Bionic 64 bits et portable avec Focal 64 bits

Hors ligne

#5 Le 15/04/2021, à 10:05

michel54

Re : lire un fichier bmp

Voici le retour complet

michel@michel-Aspire-M3910:~/essais$ sudo dd if=01r_e.bmp bs=512 count=1 | hexdump -C        
1+0 enregistrements lus
1+0 enregistrements écrits
00000000  01 6f 20 45 96 fe 9c f9  8b ff 3a 2d 5f 1b 40 1b  |.o E......:-_.@.|
00000010  7a f1 eb c0 6c 0d fa 09  74 cf ab cf 7e 1b 69 0c  |z...l...t...~.i.|
512 bytes copied, 0,0107053 s, 47,8 kB/s
00000020  78 0c a4 c5 a1 c4 51 29  50 3c 83 f5 9c f9 8b ff  |x.....Q)P<......|
00000030  4c 2d 5f 1b 68 1b 82 09  5e c3 9b e1 92 0d 9b 10  |L-_.h...^.......|
00000040  7d cf 9f d7 d7 0c a3 b9  01 c5 70 62 d3 22 96 b3  |}.........pb."..|
00000050  e7 fe 20 85 d6 ff e1 47  15 1b f1 47 3a f1 24 8c  |.. ....G...G:.$.|
00000060  5b 0d 14 4f 59 cf fd fd  59 1b 5f 2c 6c 0c b5 cc  |[..OY...Y._,l...|
00000070  a9 c4 43 22 50 3c 6e 01  63 06 74 00 b3 d2 a0 e4  |..C"P<n.c.t.....|
00000080  97 e4 85 0e 59 3c 93 f2  86 f2 8b 30 55 30 85 e4  |....Y<.....0U0..|
00000090  96 f3 87 f3 5b 3a 5e 3b  bc dd af c3 6e 01 63 06  |....[:^;....n.c.|
000000a0  74 00 b3 d2 a0 e4 97 e4  85 0e 59 3c 93 f2 86 f2  |t.........Y<....|
000000b0  8b 30 55 30 85 e4 96 f3  87 f3 5b 3a 5e 3b bc dd  |.0U0......[:^;..|
000000c0  af c3 6e 01 63 06 74 00  b3 d2 a0 e4 97 e4 85 0e  |..n.c.t.........|
000000d0  59 3c 93 f2 86 f2 8b 30  55 30 85 e4 96 f3 87 f3  |Y<.....0U0......|
000000e0  5b 3a 5e 3b bc dd af c3  6e 01 63 06 74 00 b3 d2  |[:^;....n.c.t...|
000000f0  a0 e4 97 e4 85 0e 59 3c  93 f2 86 f2 8b 30 55 30  |......Y<.....0U0|
00000100  85 e4 96 f3 87 f3 5b 3a  5e 3b bc dd af c3 6e 01  |......[:^;....n.|
00000110  63 06 74 00 b3 d2 a0 e4  97 e4 85 0e 59 3c 93 f2  |c.t.........Y<..|
00000120  86 f2 8b 30 55 30 85 e4  96 f3 87 f3 5b 3a 5e 3b  |...0U0......[:^;|
00000130  bc dd af c3 6e 01 63 06  74 00 b3 d2 a0 e4 97 e4  |....n.c.t.......|
00000140  85 0e 59 3c 93 f2 86 f2  8b 30 55 30 85 e4 96 f3  |..Y<.....0U0....|
00000150  87 f3 5b 3a 5e 3b bc dd  af c3 6e 01 63 06 74 00  |..[:^;....n.c.t.|
00000160  b3 d2 a0 e4 97 e4 85 0e  59 3c 93 f2 86 f2 8b 30  |........Y<.....0|
00000170  55 30 85 e4 96 f3 87 f3  5b 3a 5e 3b bc dd af c3  |U0......[:^;....|
00000180  6e 01 63 06 74 00 b3 d2  a0 e4 97 e4 85 0e 59 3c  |n.c.t.........Y<|
00000190  93 f2 86 f2 8b 30 55 30  85 e4 96 f3 87 f3 5b 3a  |.....0U0......[:|
000001a0  5e 3b bc dd af c3 6e 01  63 06 74 00 b3 d2 a0 e4  |^;....n.c.t.....|
000001b0  97 e4 85 0e 59 3c 93 f2  86 f2 8b 30 55 30 85 e4  |....Y<.....0U0..|
000001c0  96 f3 87 f3 5b 3a 5e 3b  bc dd af c3 6e 01 63 06  |....[:^;....n.c.|
000001d0  74 00 b3 d2 a0 e4 97 e4  85 0e 59 3c 93 f2 86 f2  |t.........Y<....|
000001e0  8b 30 55 30 85 e4 96 f3  87 f3 5b 3a 5e 3b bc dd  |.0U0......[:^;..|
000001f0  af c3 6e 01 63 06 74 00  b3 d2 a0 e4 97 e4 85 0e  |..n.c.t.........|
00000200
michel@michel-Aspire-M3910:~/essais$ 

Hors ligne

#6 Le 15/04/2021, à 13:40

Nasman

Re : lire un fichier bmp

Cela ne correspond pas à une structure de fichier bmp hmm


PC fixe sous Bionic 64 bits et portable avec Focal 64 bits

Hors ligne