Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reconstructing a jpg from a blob
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Photos et traitement d'images
Titre:
Reconstructing a jpg from a blob
Divers
Thread ID:
00939410
Message ID:
00939410
Vues:
58
I've got a small problem trying to reconstruct a jpg file from a single stream text file. VFP appears to be adding some chars to the mix. To test this hypothesis, I took a good jpg file and read it in to a var using filetostr.

lcfile=filetostr('x.jpg')
Then I created another file using
strtofile(lcfile,'123.jpg',1)
strtofile(lcfile,'123.jpg',1)
strtofile('this is garbage','123.jpg',1)

I would have thought I should be able to write a routine that looked for the jpeg's (SOI) Start of Image [ÿØÿà] and (EOI) End of Image [ÿÙ] and pull the image from the stream. However, this is not working. Even if I get a string using the above search criteria, VFP is adding to the mix.

Has anyone else tackled this problem?

John
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform