1. If we have a list of 1000 ULRs which refer to image files of the following form:

http://...file1.jpg http://...file2.jpg ... http://...file1000.jpg

Objective: We want to resize each image (e.g. 100x100 pixels) without importing the images?

Is it possible to do this without reading the files in? This would save memory and increase speed.

This question arises e.g. in machine learning.

  • 1
    $\begingroup$ I would use an external tool e.g. jpegtran $\endgroup$ – mikado May 4 '19 at 18:43
  • 1
    $\begingroup$ You might find ImageFileApply or ImageFileFilter useful here. $\endgroup$ – Carl Lange May 4 '19 at 19:41
  • $\begingroup$ Thank you very much for both comments. $\endgroup$ – Wolfgang123 May 5 '19 at 5:25
  • $\begingroup$ If you are using this for training a neural network, you should have a look at the NetEncoder documentation as well. There is some documentation for out-of-core batch generation somewhere. $\endgroup$ – Carl Lange May 5 '19 at 10:41
  • $\begingroup$ Thanks. I think you address the out-of-core training by using a generating function. Wolfram has written a very good summary with examples on out-of-core training (reference.wolfram.com/language/tutorial/…) I have successfully applied generating function. $\endgroup$ – Wolfgang123 May 6 '19 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.