convert multipage tif image into seperate files

graphics

    Sponsored Links

    Next

  • 1. Another rotated rectangle question
    I need help in plotting the rotated coordinates of a rectangle. If I rotate a rectangle at say 10.0 degrees, I need the x and y pos. for the perimeter of the rectangle. Just as if I were writing a rectangle function. The rectangle may be rotated or scaled from the center. If someone could point me in the right direction it will be greatly appreciated. Thanks, William
  • 2. Drawing Performance
    I am a maths teacher and I want to make java-applet like math applets in win32 platform. I studied GDI+ in VB.Net. My problem is: For example, I want to move a line by dragging with mouse or I want to animate some sine or cosine curves. When I animate or move, I must clear the previous lines or shapes, and it flickers. How can I overcome this problem and obtain smooth better profesional animations? Can someone please help me?
  • 3. Alt-Tab Icon
    Hi, I have a form in a DLL and if using alt-tab an ugly windows icon is showed. I would like to display a customized icon in the alt-tab screen but can't get it working. Anyone suggestions: Regards, Merijn Below you'll find some test code: Private Declare Function GetActiveWindow& Lib "user32" () Private Declare Function ExtractIcon Lib "shell32.dll" Alias "ExtractIconA" (ByVal hInst As Long, ByVal lpszExeFileName As String, ByVal nIconIndex As Long) As Long Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Private Const WM_SETICON = &H80 Private Const ICON_BIG = 1 Private Const ICON_SMALL = 0 Private Sub Command1_Click() Dim lngXLHwnd As Long, lngIcon As Long, strIconPath As String 'Use whichever icon file you want to use here strIconPath = "PATHTOICON" lngXLHwnd = GetActiveWindow lngIcon = ExtractIcon(0, strIconPath, 0) SendMessage lngXLHwnd, WM_SETICON, ICON_SMALL, lngIcon SendMessage lngXLHwnd, WM_SETICON, ICON_BIG, lngIcon End Sub
  • 4. IThemePreview problem
    Hi all, I'm trying to display preview of XP themes with the help of IThemePreview interface (in themeui.dll). This interface uses this function procedure CreatePreview( var hwndParent: _RemotableHandl; dwFlags: LongWord; dwStyle: LongWord; dwExStyle: LongWord; x: SYSINT; y: SYSINT; nWidth: SYSINT; nHeight: SYSINT; const pPropertyBag: IPropertyBag; dwCtrlID: LongWord); dispid 651; This function is *absolutely* undocumented (no info in Google or MSDN). Can anyone help! Thanks! Regards, Neil

convert multipage tif image into seperate files

Postby VG9tIEY » Wed, 12 Jan 2005 09:33:02 GMT

I am looking to scan a large amout of documents. I believe I will end up with 
a bunch of documents that contain 30-50 pages. They will come from the 
scanner as  large tif files. I would like to break them up into a tif file 
for each page. I'm pretty good with VB and would like to use it to automate 
this task if possible. I looked on google and can't find anything. I'm sure 
it's out there but I think I'm not picking good key words. Can someone give 
me a hint on that?

Thank!!

RE: convert multipage tif image into seperate files

Postby VG9tIEY » Thu, 13 Jan 2005 06:37:01 GMT

I figured it out. It isn't very elegent though. I basically open the tif 
using the MODICtl that is available if you have office 2003 installed. Then I 
systemitacally delete every image on the page except for one and then save 
that as that page#.tif. In case you hadn't figured it out, all the pages I've 
scanned have the page # listed on the bottom. That makes them be the last 
word on the document. Below is a snippet of code that may be useful to 
others. 


Set miDoc = New MODICtl.Document
 Dim breakUp, m, n, pre, post
 numberofPagesButton = True
 For n = 0 To numberofPages - 1
     miDoc.Create "C:\01.tif"
          
          For pre = 0 To n - 1
          miDoc.Images.Remove miDoc.Images(0)
          Next pre
          numberofPages = miDoc.Images.Count
          For post = 1 To numberofPages - 1
          miDoc.Images.Remove miDoc.Images(1)
          Next post
          miDoc.Images(0).OCR
          ' miLayout.NumWords  miLayout.Words(0).Text
        Set miLayout = miDoc.Images(0).Layout
        miDoc.SaveAs "C:\" & miLayout.Words(miLayout.NumWords - 1).Text & 
".tif", miFILE_FORMAT_TIFF

    Next n
Set miDoc = Nothing





Similar Threads:

1.GDI+ Imaging: multipage TIF

Is there a way to page through a multipage TIF when using 
the bmp.fromfile() and gr.drawimage() techniques?

2.Setting the compression when creating the multipage Tif files in Vb.net

I was successful in creating the multipage Tif files in VB.net using
the following the following code:

   Public Sub SaveSeveralOnePageFilesInADir(ByVal DrNm As String, ByVal

resultFl As String)


        Dim pages As Bitmap = Nothing
        Dim PgCnt As Integer
        Dim ix As Integer


        Dim fl As String


        If Dir$(resultFl) <> "" Then
            Kill(resultFl)
        End If


        '---------------------------------


        Dim enc As System.Drawing.Imaging.Encoder =
System.Drawing.Imaging.Encoder.SaveFlag


                Dim info As System.Drawing.Imaging.ImageCodecInfo =
Nothing


        For Each ice As System.Drawing.Imaging.ImageCodecInfo In
System.Drawing.Imaging.ImageCodecInfo.GetImageEncoders


            If ice.MimeType = "image/tiff" Then


                info = ice


            End If


        Next


                Dim ep As System.Drawing.Imaging.EncoderParameters =
New System.Drawing.Imaging.EncoderParameters(1)


        fl = Dir$(DrNm + "\*.*", FileAttribute.Normal +
FileAttribute.Archive)
        ix = 0
        Do While fl <> ""
            fl = UCase$(fl)
            If InStr(fl, ".JPG") <> 0 Or InStr(fl, ".GIF") <> 0 Then
                ix = ix + 1
                fl = DrNm + "\" + fl
                If ix = 1 Then


                    ep.Param(0) = New
System.Drawing.Imaging.EncoderParameter(enc,
CType(System.Drawing.Imaging.EncoderValue.MultiFrame, Long))


                    pages = Image.FromFile(fl)
                    pages.Save(resultFl, info, ep)
                Else
                                        ep.Param(0) = New
System.Drawing.Imaging.EncoderParameter(enc,
CType(System.Drawing.Imaging.EncoderValue.FrameDimensionPage, Long))


                    Dim bm As Bitmap = Image.FromFile(fl)
                    pages.SaveAdd(bm, ep)
                End If
            End If
            fl = Dir$()
        Loop


               ep.Param(0) = New
System.Drawing.Imaging.EncoderParameter(enc,
CType(System.Drawing.Imaging.EncoderValue.Flush, Long))


                pages.SaveAdd(ep)


    End Sub


My big problem now is that I was not able to find information on how I
can
also set the compression that I need for the pages of those multipage
Tif
files. For example, for the black and white images in a multipage Tiff
file,
the compression should be CCITT4, and, for the color images in a
multipage
Tif file, the compression should be JPEG medium compression with the
medium
resolution. How can it be accomplished?


Thank you very much. 


Irene S.

3.Convert image tif to bmp

4.Using MODI to convert multi-page tif to single page tif

I have thousands of multipage tif images in many subdirectories that I need 
to convert into single page tifs.  I have vba code to do this (written in MS 
Access) that loops thru the directory tree and I can access info about the 
tifs using MODI.  What I'm looking to do now is convert/save the existing 
multiple page tif to a series of single page tifs so they can be imported 
into our image repository.  Anyone know how to do this?  For example, if the 
current multiple page tif is six pages is would create six single page tifs 
(e.g. sample1_page1.tif,sample1_page2.tif,...

Thanks.

5.Convert multiple .rtf files to .tif files

I have a whole bunch of .rtf files that I want to convert to .tif
files for archiving purposes.

Is it possible to "convert" each of the .rtf files to .tif files using
the Microsoft Office Document Image Writer without opening up an
instance of MS Word? I'd like to do a "background" conversion (because
there are so many files).

Eg.:
The user would launch the application and select the source directory
where all the .rtf files are stored. Then the user clicks a "Convert"
button and the files in the directory that the user specifies are
converted to .tiff in the background.

Can this be done, or do I have to use an instance of MS Word in the
background?

6. join two tif files to one tif file

7. using Xsane to convert multipage document to single pdf file

8. Problem with ImageMigick Convert and a multipage pdf file



Return to graphics

 

Who is online

Users browsing this forum: No registered users and 96 guest