nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plj <...@mitre.org>
Subject RE: Process to create multiple files
Date Mon, 17 Aug 2015 17:45:12 GMT
Howdy,

               Thanks for the reply.  I think my situation is different than you suggest.
 I have an image file in NITF format.  That file may have multiple images and multiple bands
inside that one file.  The software that I have that reads that file does create a thumbnail
for each image and each band inside that file.   I don't know how many thumbnails I need until
I read the files metadata.


Thank

Pat

From: Dan Bress [via Apache NiFi (incubating) Developer List] [mailto:ml-node+s39713n2511h3@n7.nabble.com]
Sent: Monday, August 17, 2015 1:40 PM
To: Jones, Patrick L. <plj@mitre.org>
Subject: Re: Process to create multiple files

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 <[hidden email]</user/SendEmail.jtp?type=node&node=2511&i=0>>
Sent: Monday, August 17, 2015 1:27 PM
To: [hidden email]</user/SendEmail.jtp?type=node&node=2511&i=1>
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.

________________________________
If you reply to this email, your message will be added to the discussion below:
http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/Process-to-create-multiple-files-tp2510p2511.html
To unsubscribe from Process to create multiple files, click here<http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2510&code=cGxqQG1pdHJlLm9yZ3wyNTEwfDU1MTMzODA1>.
NAML<http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/Process-to-create-multiple-files-tp2510p2512.html
Sent from the Apache NiFi (incubating) Developer List mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message