Results 1 to 5 of 5

Thread: storing data in a picture

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2006
    Posts
    372

    storing data in a picture

    i need to store some binary data in a file larger than allowed as a resource.
    i am looking for a function that will read a file in binary mode, and store the bytes as a picture.

    reading in 3 byte chuncks, it would set the R,g, and b values equivalent to the read data.

    has anyone done this before, or better yet, have a module/function/snippet for this task?

    i noticed that once compiled, any loaded pics on a form are packeged into the EXE.

  2. #2
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: storing data in a picture

    Quote Originally Posted by rnd me
    i need to store some binary data in a file larger than allowed as a resource
    Not quite the answer to your query, but - although MS documentation states there is an individual file size limit of 64kb for files stored in a .res (and I've mistakenly quoted this in the past), this isn't quite true. In 16-bit versions of VB, the limit's 64kb. In 32-bit versions it's more like 4Gb when stored as a custom resource.

  3. #3
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: storing data in a picture

    maybe not what you want, but you could store data in your EXE ..

    http://www.vbforums.com/showthread.p...89#post2523489

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2006
    Posts
    372

    Re: storing data in a picture

    Quote Originally Posted by schoolbusdriver
    although MS documentation states there is an individual file size limit of 64kb for files stored in a .res (and I've mistakenly quoted this in the past), this isn't quite true. In 16-bit versions of VB, the limit's 64kb. In 32-bit versions it's more like 4Gb...
    that will learn me not to trust M$!
    i just added a large video file, and it works fine.

    thanks!

  5. #5
    Fanatic Member schoolbusdriver's Avatar
    Join Date
    Jan 2006
    Location
    O'er yonder
    Posts
    1,020

    Re: storing data in a picture

    No prob Glad to know I'm still of some use in my dotage (or should that be .age )

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