|
-
Jun 9th, 2001, 10:23 PM
#1
Thread Starter
The picture isn't missing
im confused about files and stuff come in
how come you cant just copy the txt version of a jpg file into anotehr jpg file so it sorta duplicates the file? i dunno y.. pls someone explain it....
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Jun 9th, 2001, 10:48 PM
#2
Hyperactive Member
You can. You just have to read the file in binary mode.
Code:
Private Sub Command1_Click()
Open "doc017.gif" For Binary As #1
tmp_var$ = Space(LOF(1))
Get #1, , tmp_var$
Close #1
Open "newdoc.gif" For Binary As #1
Put #1, , tmp_var$
Close #1
End Sub
Hope this helps.
-
Jun 15th, 2001, 02:18 PM
#3
The reason is that JPG's, GIF's and other image/binary files contain characters that aren't in the ASCII set. If you try and copy them into a string, some characters won't be read or will be translated incorrectly. Now imagine trying to write them back into another file with characters corrupted, then the file viewer trying to display that. Icch!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|