actually:
"sizes 320x320 so this program opens it and save 10 files that sizes 32x32" would require 100 files 32x32, not 10.
AW
Main Topics
Browse All Topicsi need to create an application that opens an image file and divide it into severals images size to 32x32, 64x64 and 128x128 pixels.
example,
supose that we have an image file that sizes 320x320 so this program opens it and save 10 files that sizes 32x32.
is there some code to do this?
it must be in VB 6.0.
thanks a lot!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
well, the thing is that the program must compute the amount of tiles to divide to and must have the availability to save tiles up to 128x128.
i was playing with the above code but i did not see how to save the tiles in 128x128 and it did not save all the tiles, it only saves 25 (5x5).
how about using 'image' control? is it possible?
thanks.
The PictureClip control will divide the image up EVENLY into however many rows and columns you specify:
' Based on an original 320x320 image...
' divide image up into 64x64 pieces
PictureClip1.Rows = 5
PictureClip1.Cols = 5
' divide image up into 32x32 pieces
PictureClip1.Rows = 10
PictureClip1.Cols = 10
So what are you supposed to do for 128x128 pieces? 320 is not a multiple of 128 so you would end up with a partial tile...
Business Accounts
Answer for Membership
by: Idle_MindPosted on 2005-11-20 at 16:01:25ID: 15330869
Create a New Project. Click on Project -> Components and place a CheckMark next to "Microsoft PictureClip Control 6.0 (SP3)". Draw one onto your form and add a CommandButton.
- 1), "c:\Piece" & i & ".bmp"
Set the Picture() property of the PictureClip control to the image you want to Split up into pieces. (You could also do this at run-time.)
The documentation says that the PictureClip control only supports bitmaps but it worked with a JPG as well for me.
***NOTE*** The PictureClip control is INVISIBLE at RUNTIME!!!!
Option Explicit
Private Sub Command1_Click()
' divide image up into 25 pieces (5x5 grid)
PictureClip1.Rows = 5
PictureClip1.Cols = 5
Dim pieces As Integer
Dim i As Integer
pieces = PictureClip1.Cols * PictureClip1.Rows
For i = 1 To pieces
SavePicture PictureClip1.GraphicCell(i
Next i
MsgBox "Done"
End Sub