Home Image-Pro Plus General Discussions

IPP7 Batch

Hello

There was a possserbility to dowlnoad a plug in for IPP7 for bacth processing.

Is this plug in still available? I need it for one of our old customers.

Thanks


Liudas

Answers

  • edited June 2016
    Liudas --

    I cannot address the availability of the BATCH PROCESSING PLUG IN but I think I can help you and your customer.

    Below is code that contains two routines.  SUPERVISOR is responsible for FINDING and OPENING the IMAGE FILE.  WORKER is responsible for learning and broadcasting the IMAGE FILE NAME and the IMAGE WIDTH.

    Here is a SCREEN CAPTURE that shows a run of SUPERVISOR and WORKER through C:\TEST.



    I hope this information is helpful.

    -- Matt

    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

    Option Explicit

    Sub Supervisor

        Debug.Clear
        ret = IpOutputClear()
        Debug.Print "SUPERVISOR: Hi!"

        'Set up the FOLDER
        Dim MyFolder As String
        MyFolder = "C:\test"

        'Look for the FILES
        Dim MyFile As String
        MyFile = Dir$(MyFolder & "\*.*")

        'If a FILE is found within the FOLDER
        While MyFile <> ""

                Debug.Print "MyFolder & '\' & MyFile"
                Debug.Print MyFolder & "\" & MyFile

                'Open the IMAGE FILE
                ret = IpWsLoad(MyFolder & "\" & MyFile, "JPG")

                'Ask the WORKER to work on the current image
                Worker

                'Attempt to find another FILE
                 MyFile = Dir$()

            Wend

        Debug.Print "SUPERVISOR: Bye!"

    End Sub

    Sub Worker

        Debug.Print vbTab & vbTab & "WORKER: Hi!"

        'Learn the NAME of the ACTIVE IMAGE
        Dim My_CompleteFileName As String *255
        ret = IpDocGetStr(INF_FILENAME, DOCSEL_ACTIVE, My_CompleteFileName)

        Debug.Print vbTab & vbTab & "My_CompleteFileName"
        Debug.Print vbTab & vbTab & My_CompleteFileName

        'Learn the width and height of the ACTIVE IMAGE
        Dim My_dInfo As IPDOCINFO
        ret = IpDocGet(GETDOCINFO, DOCSEL_ACTIVE, My_dInfo)

        Debug.Print vbTab & vbTab & "My_dInfo.Width"
        Debug.Print vbTab & vbTab & My_dInfo.Width

        Debug.Print vbTab & vbTab & "WORKER: Bye!"

    End Sub
  • Liudas,

    Batch processing in IPPlus 7 is implemented as a macro (not module). You can find "Batch_Process.ipm" in the Scripts folder. There you can modify DoStuff macro to use your own functions, here how it looks by default:

    Private Sub DoStuff(source As Integer, fileName As String)' Sample processing code for ProcessDirectory()' Note that the temporary image generated here is closed before exiting Dim invImage As Integer
    ' Process. Keep track of images generated in this routine. invImage = IpWsDuplicate() ret = IpFltSobel() ret = IpLutSetAttr(LUT_CONTRAST, -2) ' Arrange and display ret = IpAppSelectDoc(DOCSEL_NEXTID) ret = IpAppArrange(DOCS_TILE)
    ' Pause for viewing ret = IpMacroWait(5) ' You could write out a processed image here ' ret = IpWsSave(...) or IpWsSaveAs(...)
    ' Clean up temporary images ret = IpAppSelectDoc(invImage) ret = IpDocClose()End Sub

    Regards,

    Yuri

Sign In or Register to comment.