plj,
   I would not recommend having this processor create multiple thumbnails.  
What I would recommend is the following:

   Create a new processor called "CreateThumbnail" or "RescaleImage"

    Then have a configuration on the processor that says what size the output 
image should be(e.g. 128x128, or 1/X of original size).

    Your new processor will read in the incoming image, and rescale it down to 
the user specified size and pass it forward.

     Now if you want to create a 128x128 64x64 and 32x32 sized images you would 
do the following.

    (GetFile)->(RescaleImage configured to 128x128)->(PutFile)
                      |->(RescaleImage configured to 64x64)->(PutFile)     
                      \->(RescaleImage configured to 32x32)->(PutFile)

Where GetFile has 3 success relationships, each going to a different 
RescaleImage processor.

I think it makes more sense to have one processor create one file, then you can 
use the flow to visually configure how many copies of the file you want to 
make.  This should make this processor simpler and more reusable.
             

Dan Bress
Software Engineer
ONYX Consulting Services

________________________________________
From: plj <p...@mitre.org>
Sent: Monday, August 17, 2015 1:27 PM
To: d...@nifi.incubator.apache.org
Subject: Process to create  multiple files

Howdy,

  I'm new to NiFi so please bear with me.  What I want to accomplish is:
      read an image file
     process the file to create one or more thumbnails from the image.
     Send the resulting thumbnails along the flow

    So I can use GetFile to read the file and then send it along.  I think I
need to write a custom java processor that will process the image file and
then send each of the thumbnail files (say .jpg for now) on to the next
thing in the flow (say PutFile for example).

    Are there suggestions on what I should implement or extend to create my
custom processor?  It will take in one file and output multiple files.
Would extending "PutFile" so that it processed and then puts each thumbnail
on the flow be a good strategy?  Other ideas?

Thank you,





--
View this message in context: 
http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/Process-to-create-multiple-files-tp2510.html
Sent from the Apache NiFi (incubating) Developer List mailing list archive at 
Nabble.com.

Reply via email to