Re: Encode BMP files by BeastFish
BeastFish
Thu Apr 29 17:19:08 CDT 2004
If memory serves me, Microsoft bitmap files have "BM" as the first two
characters in the header. Just altering those first two characters in the
header should be enough to make it unrecognizable with other graphic apps.
Something like...
Open MyBitmapFile For Binary As #1
Put #1, , "MB"
Close #1
...then change it back to "BM" (Put #1, , "BM") when you want to load it.
Or get a little inventive...
Dim Innie As String * 10
Dim Flipped As String * 10
Dim cc As Integer
Open MyBitmapFile For Binary As #1
Get #1, 1, Innie
For cc = 1 To 10
Mid$(Flipped, cc, 1) = Mid$(Innie, (11 - cc), 1)
Next cc
Put #1, 1, Flipped
Close #1
Whether trying this or any other encryption or header manipulation, I'd
suggest using a COPY of the bitmap file as a precaution.
"Mike Kanski" <mkanski@asi-solutions.com> wrote in message
news:ue9Oo6hLEHA.1272@tk2msftngp13.phx.gbl...
> Is there a way to encode and then decode BMP files?
> Maybe i can apply some kind of a mask to bmp file so it couldn't be opened
> and viewed, and only decoder programm can decode it and then bmp file
would
> be viewable?
> I need to do it in VB Code.
>
> Thanks for your help.