On the other hand, the familiar PKZIP for Windows combines any files into one, not only the pictures. You could try using SHELL or similar API function from VB to control this process. I never tried it with PKZIP.
thanks for ur response, but i think u havent understood my question properly, what i mean was not compressing, i mean is that in one single PDF document all my images should be stored or to a image file lets say .JPG or GIF, u can find many such free softwares , but all of them are demo ...
What OS? If from 95 to 2k you can create tiffs with the Wang/Kodak imaging tools that come with each of the OS's (from 95 to 2k) and it is not too hard to create a multi page color tiff that uses jpeg compression. If on newer OS's (you will have to search this site because I can't find the link right at the moment) you can use another tool kit from MS that does the same things just differently.
On another note you can read in each file and write each file out to a "multi" file, but you will have to come up with your own headers and seperators and any other info you want to keep about each pic.
Now with the help of vb5prgmr i have managed to show a single image on image edit control of kodak imaging. But i would like to show different images and then save them to one single file, the same as its done by Kodak Imaging, I tried using Thumbnail but no success (Note i am talking of using Kodak Imaging Control in VB 6).
Once you have the file created you need to add pages (images) and save. Once you have a multi page (image) file saved you then can use the thumbnail control to display thumbnails of the current file.
Ok if you don't have them in a single file then the thumbnail control will not be much use, however you can simulate the effects of the thumbnail control with an array of image controls or an array of picture boxes. Then you can use the click events to tell which images the user has selected (if you wanted, or you could use any other method you wanted).
To work up some sample code will take some time and I am short of it right now. Perhaps later I will be able to do something.
Ok Gazal I have had some time to look up what you need to do/use and have confirmed what I previously thought. You need to add the ImageAdmin control to your project and use either its Append or Insert methods.
Ok, did not want you to think I forgot about ya so I knocked this cheesy piece of example code together while I had 5 minutes...
this needs to be immensely improved code uses two imageedit controls (ie, ie2), an imageadmin control (ia), a thumbnail control (th), the common dialog control (cd) and a command button (command1)
[tt]
Option Explicit
IE.SaveAs "your temporary file.tiff here", 1, 6, 6, 1024, False 'temp file name 1 (see below)
IE.Image = "your temporary file.tiff here" 'why because it has no idea as to what image it holds until you do this
IE.Display
IA.Image = IE.Image 'set the ia's image to what we are going to be working with
TH.Image = IA.Image 'set the th's image to what we are going to be working with
TH.DisplayThumbs 1, 0 'update user
End Sub
Private Sub Command1_Click()
On Error GoTo Command1_ClickError
CD.CancelError = True
CD.ShowOpen
IE2.Image = CD.FileName 'retrieve new file to add to our multi image
IE2.Display
IE.SaveAs "New or different temporary file.tiff name here", 1, 6, 6, 1024, False
IE.Image = "use the 'New or different temporary file.tiff name here'"
IE.Display
IA.Append IE.Image, 1, 1 'append new image to existing image (page 2)
IA.Image = "use the 'temp file name 1 here (see above)"
TH.Image = IA.Image
TH.Refresh
Exit Sub
Command1_ClickError:
If Err.Number = 32755 Then Exit Sub
MsgBox Err.Description
End Sub
[/tt]
I had some better code but not on that computer at the moment (and couldn't find it when I did look) so there is the example to get you started.
Ok here is the example from the professional version of the controls help file...
[tt]
Private Sub cmdAppend_Click()
Dim strOrigFile As String, strAppendFile As String
Dim lngPgCount As Long
'This is the displayed image to which we are appending.
ImgAdmin1.Image = "D:\image2\original.tif"
'Because we are using the dialog box to pick the file for append,
'we need to save the original file.
strOrigFile = ImgAdmin1.Image
ImgAdmin1.DialogTitle = "Select the file to be appended to the
displayed image"
ImgAdmin1.ShowFileDialog OpenDlg
strAppendFile = ImgAdmin1.Image
'Restore the original filename to the Image property because
'the property must contain the destination file name.
ImgAdmin1.Image = strOrigFile
'Append 3 pages starting with page 1.
ImgAdmin1.Append strAppendFile, 1, 3
End Sub
[/tt]
and the help file reference...
[tt]
Appends one or more pages to the current image.
Available With
Ö Imaging for Windows Professional Edition V1.0, V1.1, V2.0, and V2.5
Ö Imaging for Windows 95 and 98
Ö Imaging for Windows NT 4.0
Applies To
Parameter Data Type Description
Source String Specifies the image file that contains the page(s) to be appended. The file can reside on a local or redirected drive (desktop) 1.x server Enterprise Imaging server
SourcePage Long Specifies the first page in the source image file to be appended
NumPages Long Specifies the number of pages from the source image file to append to the current image file
CompressionType Integer (Optional) Specifies the compression type to apply to the appended pages. If a type is not specified, the compression type of the source page(s) is used. See CompressionType property for allowable values.
CompressionInfo Long (Optional) Specifies which compression options to apply to the appended pages. If options are not specified, the compression options of the source page(s) are used. See CompressionInfo property for allowable values.
Remarks
The current image file is specified by the Image property. If an image does not exist, one will be created.
The current image, if one exists, must be in TIFF or AWD format, as they support multiple pages. If the image pages added are of another type, they will be converted to the file type format used by the current image.
You can append a single BMP file to a new file. If you do, the only compression type allowed is None, with no options.
If the CompressionType and CompressionInfo values specified are not compatible with a source page’s page type (color), the source file’s compression type and compression information are used in place of those arguments.
If JPEG compression type is specified, and the CompressionInfo argument is 0 (zero), a default JPEG value is used. The default value is 4096 (high resolution, high quality).
If the destination is a 1.x document, and the source page does not reside in the 1.x repository, the FileStgLoc1x property must be set.
For other operations with 1.x documents, the ForceFileLinking1x property can be used.
[/tt]
The only thing I can think of is that either the source file does not exist or the destination file has not been refreshed and you are attempting to replace a page with the append command (or that is what it thinks???).
Here are a couple of links for you to browse through.
This one is for where you can find the help files on MS CD's...
It was great help, it works great now, but still i got to work a lot on it, once i m ready with a full fledged version of it, will mail a copy to u, coz u r the founder of it....
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.