Results 1 to 8 of 8

Thread: Binary Encode a BMP file

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    25
    DOes anyone know how to binary encode a bmp file from a picture box.
    Code:
    If at work Then GoTo UseDifName

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Do you mean saving it as a bitmap image? then use the
    Code:
    SavePicture Picture1.Image, "file.bmp"
    function.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    25
    no I mean convert it from a .bmp file to binary textstream. I'mm looking for the answer to the quistion I posted earlier. and a .prn file to the best of my ability to tell is as far as a bmp file goes it binary code broken up with printer orentation commands and other things commands embeded.
    Code:
    If at work Then GoTo UseDifName

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Try the Printer object:
    Code:
    Printer.PaintPicture Picture1.Image, 20, 20
    Printer.EndDoc
    If you use this on a printer that is set to print to a file, it should make a .prn file of your bitmap.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    25

    Question ok how do i point it at a file

    I have the code to print it already so if you could tell me how to point the printer @ a file I would be very greatful.
    Code:
    If at work Then GoTo UseDifName

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    25

    ok

    Ok I'm sorry you guys are misunderstanding me. what I need to do is have a picutre go through the printer object and come out as a *.prn file. I really don't know if it can be done with the printer object but I haven't found the right API yet either so...... I know there has to be a way to accomplish this.

    to elaberate on just exactly what i mean. Open up windows imaging and open a picture (i don't care what kind), now go to File > Print. When the Dialog comes up select print to file, Imaging will ask for a File name say test.prn or ImageName.prn. Imaging will save this new file to the location of the old file. Now take note pad and go open the file, this is what i need to make.

    Thankz
    Still looking
    Code:
    If at work Then GoTo UseDifName

  7. #7
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Change the entry in win.ini. If you open it in notepad, it will tell you all that you need to change. The GetProfileString and WriteProfileString functions should help here.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  8. #8
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    554
    Hey Jen

    In your other posting i placed links to the microsoft pages which gave a sample program for BINARY SAVING/LOADING images

    DocZaf
    {;->

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width