Results 1 to 6 of 6

Thread: Box To Image

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Posts
    482

    Box To Image

    Hello, I have an Array ..
    Array(1 to 50, 1 to 50)
    each array is a number such as 1 2 3 4


    the numbers refer to an icon in an imagelist.

    is there a way i can sort of CREATE an image file (such as BMP or JPG) using this array

    such as it will save a file like this:

    Array(1,1)Array(2,1)Array(3,1)Array(4,1)
    Array(1,2)Array(2,2)Array(3,2)Array(4,2)
    Array(1,3)Array(2,3)Array(3,3)Array(4,3)

    where each array piece is an image
    that would save to a BMP or JPG file with
    4x3 tiles..

    Is there a way to do this? or do i *HAVE* to post it to a picturebox ,then save that?

    thanks..

  2. #2
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    You could create an array with a picture data type, then use LoadPicture to assign each element of the array an image or pic.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Posts
    482
    Coolz, Don't need a pic box!

    But could you help me out with an example?

  4. #4
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Course I can!

    Code:
    Option Explicit
    Dim picArray(1 To 2) As Picture
    
    Private Sub Command1_Click()
        '// Verify success
        Picture1.Picture = picArray(1)
    End Sub
    
    Private Sub Form_Load()
        Set picArray(1) = LoadPicture("D:\Icons\107.ico")  '// Load images into array
        Set picArray(2) = LoadPicture("D:\Icons\106.ico")
    End Sub

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Posts
    482
    thanks !

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Posts
    482
    humm, doesn't that just make different images?

    what if i wanted to combine 2 images together
    the first image from pixel 1 to pixel 16, second from 17, to 32?

    into ONE image?

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