Creer Jpg a partir d'HEXA [Résolu]

papyvore 139 Messages postés samedi 15 novembre 2003Date d'inscription 12 décembre 2017 Dernière intervention - 10 janv. 2016 à 10:49 - Dernière réponse : Cirec 4191 Messages postés vendredi 23 juillet 2004Date d'inscriptionModérateurStatut 12 décembre 2017 Dernière intervention
- 10 janv. 2016 à 18:00
Bonjour,
J'extrait en hexa dans un memo des images contenues dans différents fichiers ,
j'obtient

FFD8FFE000104A464946000101000001
.....
4CF14E8F93934099FFD9

j'ai donc un jpg(FFD8...FFD9) je voudrais l'afficher dans timage .
j'ai essayé ça

var
EncdStream: TMemoryStream;
// DecdStream: TMemoryStream;
Jpeg: TJPEGImage;
format : integer;
begin
EncdStream := TMemoryStream.Create;
try
// DecdStream := TMemoryStream.Create;
try
Memo1.Lines.SaveToStream(EncdStream,TEncoding.Default) ;
Jpeg.Create;
Jpeg.LoadFromStream(EncdStream);
Image1.Picture.Assign(Jpeg);
finally
// DecdStream.Free;
Jpeg.Free;
end;
finally
EncdStream.Free;
end;
end;

j'ai une erreur violation
quelqu'un aurait une idée ???
XE8 ou D7
merci


papyvore
Afficher la suite 

8 réponses

Répondre au sujet
Cirec 4191 Messages postés vendredi 23 juillet 2004Date d'inscriptionModérateurStatut 12 décembre 2017 Dernière intervention - 10 janv. 2016 à 11:47
0
Utile
Salut,

essayes comme ceci :
var
  EncdStream: TMemoryStream;
  Jpeg: TJPEGImage;
  format : integer;
begin
  EncdStream := TMemoryStream.Create;
  try
    // Modification:
    Jpeg := TJPEGImage.Create;
    try
      Memo1.Lines.SaveToStream(EncdStream,TEncoding.Default) ;
      Jpeg.LoadFromStream(EncdStream);
      Image1.Picture.Assign(Jpeg);
    finally
      Jpeg.Free;
    end;
  finally
    EncdStream.Free;
  end;
end;


j'ai pas testé mais ça devrait résoudre ton problème ;)
Commenter la réponse de Cirec
papyvore 139 Messages postés samedi 15 novembre 2003Date d'inscription 12 décembre 2017 Dernière intervention - 10 janv. 2016 à 13:58
0
Utile
salut

avec ce code j'ai une erreur #42,
j'ai rajouté
EncdStream.Seek(0,soFromBeginning);
et
memo2.Lines.LoadFromStream(EncdStream); (pour vérif)
la copie dans memo2 est correcte

et j'ai une erreur #53 qui doit être une erreur mémoire ???
ici Jpeg.LoadFromStream(EncdStream);

merci
Commenter la réponse de papyvore
Cirec 4191 Messages postés vendredi 23 juillet 2004Date d'inscriptionModérateurStatut 12 décembre 2017 Dernière intervention - 10 janv. 2016 à 15:40
0
Utile
re,

peux tu poster l'image sous forme de texte pour pouvoir tester ?
Commenter la réponse de Cirec
papyvore 139 Messages postés samedi 15 novembre 2003Date d'inscription 12 décembre 2017 Dernière intervention - Modifié par Cirec le 29/11/2017 à 16:03
0
Utile
FFD8FFE000104A464946000101000001

00010000FFDB00430023181A1E1A1623

1E1C1E27252329345738343030346A4C

503F577E6F84827C6F7A778B9CC8A98B

94BD96777AAEEDB0BDCED5E0E2E087A7

F5FFF3D9FFC8DBE0D7FFDB0043012527

27342E3466383866D78F7A8FD7D7D7D7

D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7

D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7

D7D7D7D7D7D7D7D7D7D7D7D7D7D7FFC0

001108012C0190030122000211010311

01FFC4001F0000010501010101010100

00000000000000010203040506070809

0A0BFFC400B510000201030302040305

0504040000017D010203000411051221

31410613516107227114328191A10823

42B1C11552D1F02433627282090A1617

18191A25262728292A3435363738393A

434445464748494A535455565758595A

636465666768696A737475767778797A

838485868788898A9293949596979899

9AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7

B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5

D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1

F2F3F4F5F6F7F8F9FAFFC4001F010003

01010101010101010100000000000001

02030405060708090A0BFFC400B51100

02010204040304070504040001027700

01020311040521310612415107617113

22328108144291A1B1C109233352F015

6272D10A162434E125F11718191A2627

28292A35363738393A43444546474849

4A535455565758595A63646566676869

6A737475767778797A82838485868788

898A92939495969798999AA2A3A4A5A6

A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4

C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2

E3E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9

FAFFDA000C03010002110311003F0075

15620316D21F19F7AAED8DC71D33C574

1C8D590947E345583147F670F9E7145C

12B95E96928A620A5A4A280241148C9B

829C532AD43728B06D6EA3B7AD556E49

3EB529B29A4B60A29294551214628A55

C6E00F4CD002628AB7730C6B18641839

F5EB553A524EE86D5B4258A079812A40

C7AD421812402091D79AB9681E3424FF

0011CE3D290DB424E7660FFB271F9E2A

39F534F677454A51560DA213FEB5FF00

4FF0A436BFDD971F55A7CE85ECD896D1

47231DED8C74E7AD44E02B100E403D6A

516D2AF2B2A93F422A3786607184663D

00627FA51CCAE27076D861381CD4D0DB

3CB867F953D3B9FAD490DA85E66C13D7

68E83FC6AD29C9C2815329762A30B6E2

AAAA2ED5000F6A81ACD4E59588CF6ED5

31241C1C505CE3038F7A84CD1A4D19A4

6D241EDC526695B3B9B77DE0483F5A4A

DCE7619A2928A620A33EF45140067DE8

FC68A4A005CD19A568DD46594807DA9B

4805A29296980669734945002E68CD25

1400668CD584B42F16FDC33E98AAE462

95D31B4D0514945310528C9381D4D252

8241C8EB480B325BB451EF0E723AD167

239B85058907DFDAA37B891D36B118A7

597FC7CA7E3FCAA5DEDA969AE65621A4

A71A69EB56405293C633C5251F8D0018

A5542E70393471524122C6F939C631C5

0C16E46F1B4670C29054B7128908DB9C

0F5151525B0DA57D02866C0C938141AB

11400619C658741E95955ACA9A2E9D37

364690C8E339555F7E4D3FECCC3EEBA9

FF00797FC08AB14B5E7BAF36EF73AD52

8A5B14DA1990676861DC83FE351860C3

8AD3560148C553B98719913B7DE15D54

F11B2918CE97544190064F4A9E08B387

71D7EE8A8E14F3486206C1FAD582FEFF

00956F2974467087563C9A8CB1238E29

19B3C74A4EB599B12C2E15F2DF9D248C

ACC4F6A8890BC633EC075A7AC3B8E651

FF0001ED400D4066FF0056005EEDFE15

3AA2C6BF28C67A9EF4A38E3B556D49CC

56EBB5802C70714025764335F112622C

607A8EB566D2F166CED1875FBCB59573

11B72A377DE19152346D6A2195890E4E

E0BDF1EF53766AE31B686D6EDDCD2541

15DC53B958C1057A82319A9BAD59890D

C43BFE741F3771EB550608C83C1AD115

13DB2BBE508524F23B1AB8CAC67285F6

29D1535D44B14985E98E950D68B5462D

58B8A910B62D8C9C75C553A5DCDB76EE

38F4A6D2486DDC297BD251544934B70D

246108031DEA1A28A12B0DBB85145140

8B36F6C2504B1C01D8543226C72BE942

48E849563CF5A69393935293B94DAB68

1451455087ACD222ED56205328A29582

EC2A5B65569806E4545467140276658B

C54561B060F702ABD19C9E68CFB50958

6DDDDC2A7B2FF8F94FC7F9541562C47F

A4AFB6694B608EE884D11A879003D09A

0D369889EE2258C0DBC5414A589EA734

942D06DDC29296929885A29CA8D21C28

CD2104120F069058B705B2ED59092587

23D29E2A2B52DE4724F24D4B5E5D7929

48F429AB4455196E69CEA17A5329D927

A9ACD35CB6656B712A26CC84A8E14753

EB4AEDBCED56C01F788FE54C2DC61781

5B52A5D59129741588002A8C0E94F920

288181C9EF51548F707660E07BD75199

1E38A6AE5DF6AF41D5BFA7D69EB1B3FD

EF957F535300146146314087461238C8

00EE3D49EF49401411BB8CE3DE98152F

6E4C2B85EA4673E95169F6AD7459A60D

B197E5273512EC9AE42B3B1937704818

26B750B08C1900538E40E94B72F65623

96D2395630C01298C1C5413DA89EFD0B

13B5141231C1F6A924BD0BB4A29607AF

B502FE02B90D91DBDF8CD02D882EEC11

55A64693CC1C8E781FA52DA4BE6C018F

51C1E6AEC91ACC9B1C654F519EB59CF0

F9172B88D1431C060A07F5A04CB448DA

3D68149F5A32453248E787CCE41F980E

FDEA9F5F63E95AACABB01EF55658564F

987CAFEBEB5719588942E54A4A7152A4

86182292B45A98B56000B1000C9A3BE0

8C1AB166E88E77F071C1A86660F2B32F

4268BEB61DB4B8CA28A298899ADCAC42

4CFE150D4E6E5CC5E590318C66A0A4AF

D472B740A28A2988296818C8CF4EF56A

E4C2620531BBB6293634AEAE55A28A29

884A2A48A16941DA3A5318156208C114

82DD44A28A7C440914B74079A6C06D5A

B01FBFFF0080D177247201B0E4D1A7FF

00AF3FEED437789695A45734DA777A9A

78E24452879AAB92915EA6B7884A493D

05434F8E568C9DB8E7D687B02B5F5166

8FCB7C0E9DAA3A73BB39CB1A68F6E49E

946CB50DDE84F68E448476C734DB842B

2EFE4ABF5F6356208BCB8F1DCF24FBD3

D903A156E86B0E7F7AE75AA5EE59905A

9FDC8F6247EB538193552DD8A48D13F0

49C8FEB56D4E2B82A2B4DDCD60FDD060

54E08A660CAC5412107523BFB512C85C

91D00EA6A2DC7A0C803D2B5A7495EFD0

994BA0EDA59F68E31C6050F194C64520

3B0EEE38A909927FF657D6BA4CEE4449

276AF2E7B54A90843927737AD491C4A8

30A3EA7D69DD2810DA9630BB79C66A3A

3B53010F5AA974A659162276A9E41C64

93E956CD427CB6BA8958A6E07383D680

2EC68238D57D0633D2A85E4CAD329126

C00119CF5AD09036C3B080D8E33D2B1E

6864C6C8DF6B2B7CC4D4C9D8B8ABB255

C638C1CF714F6F24418C282783815020

68102CA59DBD769A8CDB24B209599CE1

B3B5BFFAF592D0D9AB9A966C4AED2EAC

540181C541A81F30AAC523EECE182E71

8F7C5496592F27A74EB4C9D04332244C

50B9C925B3FA1AD91CF225C6171E9C52

1A71EB484714C9128A296802391048B8

EE3A1AA8CA54E1B83FCEAF71DA9AE81C

61866A93B1328A651A2A6780AE4F2C3D

7B8A89948FA7AD68A4998B8B42514515

4489452D00124003340C4A0F029EF1B4

67E7522A54B4F314F99C0238152E4915

183910514A4104AB0219783C52534EE4

B56128A28A604B0CED16718E7D6A3662

EC58F5349452B6B70BBB5828A5A514C2

C02AC58E7ED195195C1C9A8E285A4E4F

09DFDEAFDBA853803031594E7D11BD3A

4FE26661A28A4AD4C03AD1451400A158

F404D4D6C84B6F2BC76A75A3B61801F2

FAD4E2B09CBA1D54A9FDA147028CD069

DB414C9EB599D054BD877AF9883E74E7

8EE29B15C7991850312639E38FAD5BA8

42C71160FC46C720FA1A97152DC869AD

50C3C700E714991903AE7A01DE9C9199

0E57E54EC7B9A9D6258CF0393D49EB5A

58CC8E3888F99F93D87A54C28C514C41

9A293AD3C14D983D6801B494B403839A

00422A94EB38B859B00A230C00327157

26942A6E6C002B266BF95A4210ED5E98

001FE749BB0D45CB637E271244AE33C8

CF22A9CF88EEC923823349617B13AAC2

AAE081D48152DC8F362592319233F88A

4F545AD195E470ED91D2A2277371CAAF

27EB519FB38386D8093D0E01AB96B0EF

60C41545E8318C9ACED7668DA48B36A8

52119EA79355246496ED594484A9C60E

700D4F7B74B6F19C8EA3AE38A8EDFCB1

10316D20F7518AD5183260A589C629BD

F069D9C7438A6D32471A69A093450027

23AD19A91DD4A8029BC50313E951345D

4A707D3B54BB73D2A4F2C04CE79A00CE

651B82E0AB1EC78A592078D4336307D3

B55CC64F4A6CE1A48F6A81F4356A666E

08A14E8FCCDE3CA00B0FC87D68F2E4DC

136004F7072055C8D1635C2F1EBEF4E5

356D02149B7A92920E338A6E6928AC2E

7572D85F302862E7E5C739ACE6C66AF3

00CA41E8460D52C11953F797835AD367

3D78F51292968AD8E72CDAC292231619

39C541228572076A14B0E848FA1A7471

34BCAF0BFDE350DDB72D2E656488FB80

0127D075AB305B71BA61CF65EDF8D4B0

C491FDDC96C60B1A9548CF3594A77D8E

8852E5D58DC7352C5F7A91F1DA9D1F5A

8356F4328FA52A2EF70B9C521EB495D4

79E4B3C5E511F3673512A976D8BD4F53

E82909FA927A55B82331A7CDF78F271F

CAA252B2B1B538733BF424550AA140C0

14EA414560762560A5A4A5A0614300C0

820107B1A28E8681090363E463964EBF

4A91CE5B8A89D3243AFDE1DFD6951C38

E3823A83DAA918C958911829E687218F

14DC52134C917A525253B02801293341

34868033F54DE51480766793EF542386

49B22352D81938AB77D7A645302AE141

E49EF505ADDB5A96DAA0EEF5ACDEE765

34D40642E51C2E4A8620356A2EA08266

75FF00568022F6FF003D2B21892C4FA9

CD2648079A130953BEA6ACBA8799092C

87038E1BA9A7C7A9237905D8AB03B5F3

DC1EF59B21C4489BB2319E0F14E92D65

8A259180DADEFD3EB4EE4469A68B1A94

8D25D150772F0579CFE55258AC904DB2

41B438C8FAD66AB6C60C3A8AB46FA492

689880A15BA0A49EA54A0F96C6D0231C

8A4A31DE8AD0E4173498140CFA714868

0038A4A29C172681094B93EB4E64DBDE

9B40C3AD31DB1F2A0CB9FD293796E23E

3FDA3FD280028C649F527A9A4D9718DC

44408BD72C7AB7A9A7514BD2A0D52B09

4B42901B2695C8278A0043C8AAD73116

01D3EF2F5F7156452A81B86EE94D3B32

651BAB19C3046472297A63BFB7AD5CB8

803480C64018E688E144FBA39F53D6B6

750E78D16DEA450C049DD28E3FBA7F9D

59146292B16EE74C62A2AC877B5028DA

40C9E9474A4316A44C6E151E69D11F9C

5344B5A14F7C5F67C1C6EFA5573410E8

FB64186FF67907E953C56FD1A4FC056E

E491CAA1293B05BC5C891BD3007F5AB0

28A2B16EEEE75C62A2AC85A732ED0299

4B927BD218945145031475A7AA8239A6

51409A0E9513AB071220CB0EDEB52539

90A804D0989A4C4122CA80AE7DC1EA28

E077A8D9083BA32037707A1A1250CDB5

86D6F43DEAAE62E2D1304CA934CA5CE3

E94B914C4461D4B94DC370ED43E154B1

E80532F1018FCC03253F3C5452977B49

0AFEF14A11B97D71DC5008A16D666E51

9F7EDC7418EB55994A3153D454893491

65518AE7A8A8CE49E7AD64CEF8A6896D

61FB44EB193807934B796DF67976A9DC

0F4CD448E51C321208E86959D9E40CC4

B1F7A40D324B8C0D9803EE838A9EE6FC

4B6C225539C0DC4D5394FCFD7381E98A

6E69B1412695C2947DE5C7A8A58B6191

449C2679AD0BBB3890452C07E52C3BE7

3CD090E724958D5032A3E94DDBCD3D01

2B8148C0E6B53858A8DB0106A3341A50

2810014ECE280091C5427CD66392107A

0E4FE74AE349B24925541F3103D2A221

A40377CABFDDEB9FAD2AA2A1240F9BD4

F27F3A5A96CD230EE1D3031D28A5A7A6

DDBCD22DE8328C51DE8A0621A28A2800

A76693B50280168A280093C5020C52E3

8A0823AD27340C717CAE314DE9450066

810669D17DF14854A8CD117DF14C4F61

33494B4941428538CD25481C05C62A3A

0485A4A28A061453D8285E3AD32804C2

8A28A005A5672C30693069281585A6BA

AC8A55C641ED4A0D2D032311320C4726

00E8A4647F8FEB4B99471B51BDF711FD

2A45193814AC0A9E69DC871442CCC460

C44F6F948A8ECE468DC249DCEDC63FCF

AD583555F02E4800E480738CFAF6FC28

4C99452D4354B252BE6A039279E6B352

D66932510818DD923A8AE8E6884B1953

8F5191915109CEC1E5AAF1D79C01532B

2D58D4DAD0C096D658911DD7687CE01E

B510438DDB4B05E5B03A0ADBBA67284F

CAEDB490A57A7D2B2127640E8B8DB20C

1E2A534F6368C9B44AF6077622059597

7AE39CD3BFB3645721C611465DBB01ED

5A9A6CC9F648D198065E3078ABA54329

0C0107820D5D9332E76B439475C65963

6099C0EE3F3A9ADA567962898FCBBAAE

6B08119017555C7C88054361685984AF

90BFC383834B666A9DE26C2BED34C79D

01C33A827B66A210A77DCDFEF3134F54

5418450A3D862AAE61C8C4F37FBA8EDF

8607EB487CD7FBC5507A2F27F3FF00EB

53E8C52E629410E88AC51855078A6927

3CD28C02334E9181C6282AD6D88E9714

519A430A334525002939A28ED45030A2

A58D41539EF51B801B028B137D46D2D1

4E45DC7AD036252AB60E6919769A4140

0F66C9A6E68C5262810B403CD26334B8

1400F7705714D8BEF8A434F87EF53135

A0CA4A073D28A0A0A28A2800A28A4A00

5A2928A005A29291B3B7E5EB400ECD2A

805867A5468DB9734ECD003DC00DC74A

4A4CD19A007A1C36687393C53296815B

51AE76A96C67033504ACAB79113D48C1

FA67FF00AF523312251D80A8DB125EC7

19CF4EA3AFAFF4A1133D8D3270A4FA0A

CD8E4DA392304FF3AB97522C70E598AA

9E09A54B78762E10118EFDFEB4A70E65

6334CA0589F9402CEA70003C906A06B0

31A65E22001D783FC8D6C6E8E2DA8005

C9C00077A7328752A790692A6921B6CC

BF2C606C21703248ED53C376CB22ACCC

42B0E095E73DA9F25AB804210CB9C907

A9FC6ABC18B998A480ED619EBE98A88A

945836866A023B878E45566C75EA303F

A5598C008000001D852DC35BAA48368D

C300F18FA5310B88D70A0B11EBC56ACA

8B2C6C5D99A8B34D1BFF008B18F41DA9

D48B42D14514141451F5A28105145280

58E0500251C52B295EB4DA0075252669

7AD00286207149D68C519A0029C1B69E

29B9A01A0052771C9A4A2940A0033494

EC539141EB40AE479A5CD0DC1C525030

3CD4B07DEA4450453A118634D12DE846

8D83CD213C9A4A3B505052AA96E829B4

F47DB9CD026369294F249A4A0685A307

D28A9548D9409BB115251467009F419A

00A9712CC24296CA088C6E7CFF002A9E

0956689645E8C3359F0DC66E93CECF97

26588CE39EDFA542B76F66D224015A36

6CAEEE829D8C94F536AA1B89D6DD3246

E6270AA3A9359C9ABCA1BF791A15F6E0

D4D1CA6612DE0192836A29E71EF458A7

3EC4F6D765C3ACE86391392BED56FBD5

29590DD5B4EAE1B7A10D93C9E3BD4EB2

103800527A150BB43C27C8DBF8C9E69B

60825B89256C1DA76FAD4534C42E49FC

2ADD8A886C95CF1B86E342267A6817C3

70407A7D6A9C9712C40408C42F5DC7AF

D0628927F3642C5FAF419E951151237F

AC391EB8A894C519456E892081A725B7

B290739CE49351869212D1873824E79E

F4ABE7459D8E39ED8C545BF7296FCF35

3CDA1D11719B2412CAADB964607EB914

E8C3158C2B952C40DC3A8A962811EDD9

CE770A814E1148E08008A2ED5AE67554

5C9245A5B7DA312B79841C824F5FAD3C

963F2A9C7A9F4A4B724C0B9A6DC49B00

50096638F96B4DC5B21731A9DCD3631D

589E3FC2A5E3B1047A8A87181D31E99A

48D82398CB039E466A9A2633D49F34E8

F19E699F9D2D49A31F2E38A8E9692804

14F53B4D3452D00C5760D4CC52D14021

28CD4B1A2943915191405C4CD19A3146

2801C016E052152A706951B69A591F75

316B71B40E2929D8A430CD19F4A28A00

4A434ECF34868000C47435343DEA0153

41D69A265B1176A4A28A0A0A28A2800A

28A46240CA8C9A005CD2D432063CF941

CE7D4715227DDE878F5A042D50D4AE8C

6BE4C4D873F7BD855FCD64EAB12FDA23

7E417073F85344CDE825A2C733A3B667

97FE79F40A3D49A935948B6432461031

C83B3A5334688B5D9383E581CFA5686A

F6AB2599754F9E3E46076AA31E863D84

2B35CAABF4033F773F9D6ABEA46CE511

CCBBE32382A8571F81A8B40505E66EA4

0007B75ABD7496772409DD094EDBF18A

408C192E166BEF3510226EE0018ABE26

1B372F2BF5E6A8BC119D45A34E230DC6

3D2ACA28518E540CE07734586A4D6C31

A42D93D33DC8FE55A52DD46F0F92BF79

7191EA2A815049DC38E0E29225605413

FBAC1DBDA95BB09377B968303C93FA53

58AB1C70463A1A84EE5246E6041F5A55

9771DB2639E8D58CAF6B1D3EF45733D5

1272070491E94C99418F781CFF003A70

254F5E3F953801F30C6548ACC87CAFDF

89199196338240C52B70ABF4A8C9FDD8

C0EB814F947247FB34CD67ACE25BB56C

C58EEA79A4CED91837049E0FAD3ADE35

8E21B72723A939A7BC4251B4D742D0CE

6AE85670C8063914C4552C010319A594

08DB0CC00278CD451F9B26770DA99E0F

A8AAB98A4DBD0B137C84153C67914020

E40FE13834C72148C9E07269B0A1752C

F9018E71EB506C3CC8A0E393F404D3B9

C669E1308303F0A403340D313A51934B

8A3140C4A5CD18A52842E7B5002038EF

494BDA92800A4A5A280128C52D19A003

1476A2909A005A2901A5CD0018A3A53E

3E4F344AA14F14C57D6C32A583AD420D

4D075A10A5B109A294D20A0A1E5976E3

1CD44CC071C927B0A304C809CE00C8FA

D377855690F4EDF4A09D87296E770C7D

0E69B239042A6371EE7B544033FCCCCD

EA0038C52AA10C599D989E39AA48CDD4

D2C83328E7CCC9F46518A9E0955810C3

0C3A8A8F6900120E3D6A332224EA1980

38A6D13193BEA59AA9A85B99A352BF79

0E6ACA48AFCA32B7D0E69880B2B2B8F9

88191506AF55617EC6F15B8481D80C67

39EF4CB449925092485B2790589E31EF

57EDC9302678E29CEE91297721401C93

546562A3C096B6A638B700DD5B9355ED

2CE42DB8EC55C1036771EF5761BDB7B8

7D914819BD306A495F6464F7ED4C0C7D

5A3F2EE23751F230DAC47AFF009C5473

6E20E4301CF19A92F64DE24B5CE48008

E3BE79FD33470DF331CF3C522591DBA3

DC6D8E118C7535B491476F192074EA7B

9AAD6318821DC07CEDC019AB178D881B

1F4A0A464DC0795DA4279FA5571E9C52

B93E6B018C7249FA0E69A1873D01ACE7

B9BD0AB67C8C9E06EAA793DAA5DD8C55

68DBE753EF8A999B9C7BD62D59915572

4DDBA8D03200F7AB1146934CE1D881B7

B542A30EA0FAD04E5C91EB42D19A2579

A5E45F876F96029C81C669CAEBBB0186

EF4CD436DB7ECDF374C9FE7528381858

9B1DBA0ADC4C91BE7E1803F85276E94E

1D45399401914C57B10C8C8A3E7E87B6

339A81EE092B188D90B7009C63F9D3A6

60B3AEE3804719F5A026E61819354919

CE4EF6438BB187603CE3839A7C4FBE30

4F5A85D4E0A9CA93C668855A375552CC

878209CE28685095996A83451506A262

9FBFE5C533B514C2C0471498A5CF1466

90C4A5542C38A29558AF4A018DC1A422

9DCD1400D229C89B8D2629558A9C8A01

88E9B4E29B4F6258E4D3698D02B15391

4AC7775A4A290062A583EF1A8F15241F

7A9A14B621340A0D028188C32081C647

5A86600346BFC39FE953D473219130A7

04720D08992D06D14D89F792A410C0F3

4F752A704568730E32931EDC7E351803

39C5140EB400D707EFA7DF1D3DFDAAC2

B091030E8C334C910C7F788C7AD16EA4

5BA8E4647E552CD61727B37F9021C703

8C7D696F2D52EE2F2DD980072306A384

6E85630F89933CD477B73343105C052D

C06073FD2815AFA10E9B61B1FCC90A9D

870A549FC7357A76C954FC4FD0567D84

F26E645C9CF3CF6A76A3722DADD9376E

99FAE3D28B84A3CBA19F6FBA6BE776E7

736D3EA01FE553A6F18465248EA57EBF

FD6A82C632D1FC80F9ACD906AEAAB1BD

C8E10F3C739F7A08342DD7A7A20C0A8F

5263E4E067D78A9ADBFD58FCEA96A326

65099C8519C50574338865662460F23A

D4752142033139CF4F4A4033DAB29EE4

45FEF108A4B100607BD5C11991D78209

E72548A2C55096C8059718F6AB614994

37B629A827AB3A2BBE697A118B74CE58

B13EBB88FE5514D1794C31F70F193D8F

BD5D652A79A6300C304023D2A9C53223

269DC8D0908B12A82401B89E80D3F639

39695BE8B80292D94A42A318CF38A929

D81C9B1A19A3237B6E4F5EEB53035130

CA907A114E84EE8509EB81432A2C8E60

0CA09E700601ED429DADBAA60819F240

CD4133C6B2940C370FE1EF4D32249DC7

48FBDB38C52C32049003D48E2A08FCC5

CABC6E4E491C67F5A99014F9E41C9E00

A1B1462EE4EC77126929B12958D57B81

8A7952A7A541B09477A28EF40C4C514E

C64E29AE083CD001499A28A061BA8CD1

5246A0824D00DD88E8A5230714940051

45140052529A280000D4B0FDF3518352

C5F7CD344CB620A0514505122C791926

A26E0E3BD3C390315137122B1F422827

52284E101EE09CD4B2BEF20E2A36FDDB

B670158E41F7A5C55A3092684A314AB8

C8CD49284C0DA699242E59E4447FB84F

D73ED56540CF27155492678D50166073

FA62AFC3108C658E58F53FE152CD22F4

2B34B17DA191C15C1CAB8EA29643204F

99A29A33DC8E7FFAF4DBD89B7990292A

4738ED54CA865DCBC707BE3FFD7408B1

3BCF6A80C30A12DD422D67B432DCC9E6

DCB71DF8FD2AEDC444B2C4CC5F0012C4

7352C166C546E1819FE2E4D02DD9144A

C4288D7626402DD49A9DD7CA90803E9F

4356D82AA007FF00D755A75DAE99FBC4

E719A632683EE27D2B3AE86FB895B91C

E3F2156A1B85880497E500F0C7A524B6

E4B16001E72A38E4D02DCCF03CDC8030

C48207A55B86C9021DCA1CF727FC29B6

B1955249071F28FC2AD2B9506A6DADC1

2EA4198D1FF75182DD0950001F8D1E6E

F6318CA38E4FD2888E625FF3CF7A5083

7EFEF8C55584DB1ACAC0128EDBBDD891

FAD1FBD03797F987254018FF001A9072

78A4992454C00327D4D3112020E08E86

9ECC08000A8227E88C36B01C73906A5A

92C42370C1E8699B7C9C142DB40C1049

3C5483AD3EE53743853827F5A0619E86

9BE6286C3061EE471F9D32194B615A32

31C641CD4D8C0C549A26991B48B81891

067A1269C807DEE49F534E18CE7028A4

3141A567DDC530B0519240FAD0195BA1

07E94C05CD19A29761233487A006C1A2

460D8A6D14C2DA89462968A431294123

A1A4A2800A28A5A002957AD251401248

4103151D14632698968281CD4A830691

5768F7A727514D10D95A81453B69033D

A91635864119C7BD205DCB8603D29694

70450318D1BAAE0ED71D81A8CDB46E98

65DA7D158E07D2ACBBEE1814D02826D7

DCAFE54CA001B5FDC9C7F8D1E548FC37

C83FD93CFE756B69C671D2A204970318

18CD3BB23910FB381519980E9C03EBEA

6AD9A86DB8461E8C6A493FD5B63D0D32

489EE621FC448F555247E959E5712165

52473CEC39AB712928A00CF14A4ED072

70052B95CA54967065490F4C0C83EBF4

AD38DC3A061DEAB32AC91E3B1E4114EB

32C37A376A7726D62C37DD27B8ACF4D9

B376CFDE30C926B4186548F6ACE8FF00

D5A93E829A26448D11D9B8FE55008225

3911A03EC2A5372BB76EE5FCE99E4095

7F7A49CF254741FD69DC9B091305631B

119C923DF3535406CC003CA729B4E402

335644522AE5D95BDC0C54B2915917F7

AEE3804E31DB8EFF005AB2EAA230475A

8146C764CF39DC3DE959F62E4F41544B

1C0E0E452BB96EBDAA28DC4881877ED4

E662AA4E338ED40864C408CB63257918

AB70BA94CF635531E7AED01957B9231F

CE9A9115671E61539E76E39FCE914B42

569C895B8FDC8E09F7FF000A90CC8A3E

F024F400F5A8C00AA14740314888B183

B0633EF4EC1CC3E27F2CE48EBCE2A559

C492B201F74039FAE7FC2ABBB85E3A93

D00EA6921674933201873818FE1F6A4D

1507A979029E5A9A481923F5A4069920

0C7E6E10724D41B083697DC91EE3FDE3

FE34EDA1C7CF1A83EDCD3A26490161FE

14039E474A04AC1C018A7EFF009718A6

5069156B8B452668CD0018A314669334

0C294293D29335246C075A04DB488E96

9588278A4A0614514A17750000126A45

5029000BD39A5AA21B16957A8A320D0B

F78504F42B52EE38C76A08CD18A46A25

048032694F03269814BF24903FBB4080

02DCB1207A038A679C33958D88FEF0C7

F8D4927FAB6C71C1AAF13ABC60A1C81E

9DA9A444E562CADD46101DE31D3DFF00

2A48E547380483E84107F5AACB0A8919

8F393903B0A73F1F38FBCBCFE155CA42

997ADBFE5A7D47F2A924FF0056DF4355

92758598392371057DFB53E6B842AD1A

B65B1DA90FA8C8890ABF4A6CD9383B54

E39CB745F7A4797661557737A6718A86

49259308C8154FDE2AD9E3D3A52B14E4

90F4911707CE420FD31F854E876CC8DE

BC1A812189C152AA303818A118A8209C

EC20834ED6279AE68F6ACE542C0A8C03

923F5AD01C8C8E95498F953C9C743B80

A688645B54C6607003630548A9472A32

08F6A40E936240AB9C633DC7B53A90C2

972718C9C7A52ECF9734DA00649E5953

E66D2073CF6A5485442ADB70DEA4738A

8A74532C44F738233C1183DA9E923BE7

3F73A0F7A057D463C23CC1246103F7C8

EB4A12462379500765E73F8D4A2A4551

B09EF45C7644673DBAFBD5788105B79C

BE7E6A95E5DADB76B31C678A60C92CCC

3058F4F4A68521E31B867A54936CE0A6

3F0A8A8CD51007006491814D5FDEB26D

395C862DDB8A99E3511124FD734CB502

3B64E3009E07B678A9933482D4925665

51B40DC4F7AAED1BB3A9323119CB027A

FA54D71B804DA4677639A42416DB9191

DB349153B80FAD36190C6EB0C8C0E47C

A7A54CAC822C63E6A82550406C0DC3A1

EE2864C5D8B34503DE8E2A0DC4A50093

8C514AA4A9C8A062152A706929CEC58E

7A5368041452D18A004A51ED4629EAB8

E4D026C153D78A76450C72692993B851

9A28A6028EB4A3EF0A406853F30FAD02

6315801C8A61A5ED8A2916324FB9F520

1FC6A443B4E69B4B8A0086EB1248A9FC

38C9F7A40BCE3B52CB1B6FDE83771823

FC2A30F97285581033CD5A3092772792

3555041355A58860B81861CE73D7DAA5

CE3A9C0A639CFC8BCB30E94C944AC18B

32E55C1E76B0C62A4550000001EC2831

A310594123A123A53AB33A1222922DBF

3E7EF76A8C549705845C1E9DAA30AC17

279F702AE2F4309A770A698C9C90CC09

F43FD29C2A408A622C0F229928B503EF

855BDAA0BA5C4AAC3B8C53EC79B553EB

934FB98CBC795FBCBC8A45F433DA3533

F208DC3AA923F954FD2A360B20E41047

E04531E22EB832B93DB3FE1DE8B129D8

B3BC85C543E71CB0F29CE0E3208FF1A4

12C9800C4777AE463FC695460601E68B

03901562DBDF038C003B5451CCB10F2A

5E19075EB9153B065EA314D3CF514EC2

BEA304A55F7B9F91F803FBB5608A8880

C30C323DE9BB0AF0B2381E9C1FE74AC3

E615F9987AA8E69452050A38EF45344B

63990AE3DE9B9A52E580E981E9513C7B

A54DACCA4F076E3A531DAFB0F0BBE52A

D9DA0671D8D4DD6400745E691222B921

C927B9C52ECE814E06724F7359B66F15

6439955C619430F423355E5D96CE1F68

58C8C703A7E15668E6914D5CAA92B4B8

30A6F53DC9C54C91E0EE73B8F6C74152

9040E94945C518A414B452D22C4E2838

A28A004A28A0026800A728CD39546DE4

734BF4A7626E03028CD0064D21E0D310

1345145002E723149451408514A3A8FA

D36947DE1F5A018CC52529A4A45852D3

D36E39A6B633C74A02FA8951C916E218

1DAC3BFB549499A04D5C885BA9FBE59F

D9B18A915150611428F618A766933ED4

5C12485A4A91946DC8A8E81EE23AEF42

BEB55BED3244863789D88EEAB9CD5ACD

2509D89946E5505B70DE36861F28FF00

1A733EC5CF7E98F5A9D955C618023D08

A458522E5235538EC3155CC66E992D91

FDCED3C302722A7C8E9544439392CDF4

2791F4229FE4C4460C6A7EA295CAE564

774D12CEA11403C9623FAD21C8A9B629

529B06D3DB14C102772E71D8B1A6A44B

A6408C5D988FBA381EF4EF3046EA0F52

7029FF00660BC46EC8BFDD1823F9523D

BF0187CD229C82DFCA9F313ECD8E772E

41F4A68E0D34C9B7EFA3A9F4DA4FEA29

198B2FEE812473D3B53B93CACB47698B

3DEAB9C91C75A5E08C83C523301C0196

3D07AD0044B3A0256460ACBC124E051E

6EF6D912B367F8C0C8156624289CFDE2

7269F52E468A9900B65518591D71D860

FF003A923895390496F534FC518A9B9A

28A1E00D94CA28A069094B4514862B3E

46314947E346D38CD01B0668A2942934

0094A0669C140EB4EFA530B88140EB4B

498C9A52314C9B89451450019C519CD1

8A31400514A0714B814086D14B8A4A00

534A3EF0FAD349CD283C8FAD003704D1

B69727149B8D161DC5DB46DA42C68DC7

DA8B05C5DB48569C4F19A334582E336D

2EDA7668CD160E61BB68DB4FCD275A2C

1719B7346DA9001E94B8A2C1CC45B69C

7918352050682A280B910146D1521029

302905C6AE01CD047269E14134141EA6

985C8F14629D4B8A02E3314629FB4505

71482E42618CB64A0C9EF42C489F7542

FD0549450009819CD348E6968A006E0D

18A7518A0770403BD348E69F4B8E2815

C8B07D29769A7E28C0CD3B05C66DA783

818A5C0C5181409BB8DA5FC6971499C5

0171540CD07AD149400668CFBD145001

466933466818EA29326973400E046DA4

A4069D4084A434B41A06329CA3E61F5A

4CF14E8F93934099FFD9
 
<signature>papyvore</signature>
Commenter la réponse de papyvore
Cirec 4191 Messages postés vendredi 23 juillet 2004Date d'inscriptionModérateurStatut 12 décembre 2017 Dernière intervention - 10 janv. 2016 à 15:59
0
Utile
ok, Merci ;)

question:

les retours chariots et les lignes vides sont elles vraiment présentes dans dans fichier original ?
ou c'est juste la copie ici qui a "foirée" ?

Commenter la réponse de Cirec
Cirec 4191 Messages postés vendredi 23 juillet 2004Date d'inscriptionModérateurStatut 12 décembre 2017 Dernière intervention - 10 janv. 2016 à 16:24
0
Utile
Voici la solution testé OK sous D7:

implementation

{$R *.dfm}
function ExcludeChars(const S : string; const CS : TSysCharSet): string;
var
  P, PR : {$IFDEF UNICODE}PWord;{$ELSE}PByte;{$ENDIF}
  Size, I    : Integer;
begin
  P    := {$IFDEF UNICODE}PWord{$ELSE}PByte{$ENDIF}(S);
  Size := Length(S);
  SetLength(Result, Size);
  PR   := {$IFDEF UNICODE}PWord{$ELSE}PByte{$ENDIF}(Result);
  I := 0;
  while P^ <> $0 do begin
    if not (Chr(P^) in CS) then begin
      Pr^ := P^;
      Inc(Pr);
    end
    else Inc(I);
    Inc(P);
  end;
  if I > 0 then SetLength(Result, Size - I)
end;

procedure StrToImage(aStrImage: AnsiString; aImage: TImage);
// cette fonction ne sert qu'à afficher une image Jpeg contenue dans une string
var MS: TMemoryStream;
    JPG: TJPEGImage;
begin
  if aStrImage = '' then
    Exit;
  MS := TMemoryStream.Create;
  with MS do
  try
    SetSize(Length(astrImage));
    MoveMemory(Memory, PByte(aStrImage), Length(astrImage));
    Seek(0, soFromBeginning);
    SaveToFile('test.jpg');
    if (aImage.Picture.Graphic is TJPEGImage) then
      TJPEGImage(aImage.Picture.Graphic).LoadFromStream(MS)
    else
    begin
      JPG := TJPEGImage.Create;
      try
        JPG.LoadFromStream(MS);
        aImage.Picture.Assign(JPG);
      finally
        JPG.Free;
      end;
    end;
  finally
    Free;
  end;
end;


procedure TForm1.Button1Click(Sender: TObject);
var
 aStr: string;
begin
  Memo1.Text := ExcludeChars(Memo1.Text, [#13, #10]);
  SetLength(aStr, Length(Memo1.Text));
  HexToBin(PChar(Memo1.Text), PChar(aStr), Length(aStr));
  StrToImage(aStr, Image1);
end;

end.
Commenter la réponse de Cirec
papyvore 139 Messages postés samedi 15 novembre 2003Date d'inscription 12 décembre 2017 Dernière intervention - 10 janv. 2016 à 17:40
0
Utile
Super
merci OK en D7 je vais regarder si je peu transposer XE8.
pour les retours chariots et les lignes blanches c'est une erreur que j'ai fait en créant le fichier txt.
merci encore
Commenter la réponse de papyvore
Cirec 4191 Messages postés vendredi 23 juillet 2004Date d'inscriptionModérateurStatut 12 décembre 2017 Dernière intervention - 10 janv. 2016 à 18:00
0
Utile
re,
pour les retours chariots et les lignes blanches c'est une erreur que j'ai fait en créant le fichier txt.

dans ce cas tu peux te passer de la ligne suivante:
  Memo1.Text := ExcludeChars(Memo1.Text, [#13, #10]);
et du même coup de la fonction ExcludeChars
merci OK en D7 je vais regarder si je peu transposer XE8
ça devrait passer tel quel !!
au pire il faut changer les string en AnsiString
et les PChar en PAnsiChar
procedure TForm1.Button1Click(Sender: TObject);
var
 aStr: AnsiString;
begin
  SetLength(aStr, Length(Memo1.Text));
  HexToBin(PAnsiChar(Memo1.Text), PAnsiChar(aStr), Length(aStr));
  StrToImage(aStr, Image1);
end;

Voilà ... si ça te convient n'oublie pas de cliquer sur "Marquer comme résolu"
Merci
Commenter la réponse de Cirec

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.