3

Unix command to make png series from gif pictures in a directory

# steeldriver, https://unix.stackexchange.com/a/370132/16920
find -L . -name '*.gif' -execdir sh -c 'for f; 
      do convert -coalesce "$f" "${f%.gif}%05d.png"; 
done' sh {} +

Pseudocode

  1. Pass the info from ${f%.gif}%05d somehow to LaTeX in one step.

    • find max filename series end and apply this to LaTeX file filename and iterate. Pseudocode to find the max series image count

      \usepackage{bashful} 
      \bash[stdoutFile=gif_series.tex]
      find -L . -name '*.png' -execdir sh -c 'for f; 
            ... TODO LaTeX + find max image count + apply it to LaTeX
      done ' sh {} +
      \END
      

Data files

  1. Example list of gif filenames

    /home/masi/Images/cautious2.gif
    /home/masi/Images/cautious.gif
    
  2. Example lists of png image series where the end number go max to 99

    /home/masi/Images/cautious200000.png
    /home/masi/Images/cautious200001.png
    ...
    /home/masi/Images/cautious00000.png
    ...
    

LaTeX where I want to direct the image series on own pages where the filenames are now form out000xyzw

\documentclass{beamer}

\usepackage{bashful}
\usepackage{pgffor} % I think needed, but possibly not since Bash

\usepackage{animate}
\usepackage{graphicx}

\begin{document}

\begin{frame}
    \begin{figure}

    % TODO apply here Bashful somehow
    % TODO something wrong here because the bash should be inserted here and not to a new file if the main script is compiled
    \bash[stdoutFile=gif_series.tex]

    % AlexG, https://tex.stackexchange.com/a/373780/13173
        \animategraphics[
          width=\textwidth,
          controls,autoplay,loop
        ]{12}{out000}{00}{16} % TODO here {out000}{00}{16} for dynamics

    \END

    \end{figure}
\end{frame}

\end{document}

Testing TH.'s code

I had to do touch test.stdout test.stderr test.stoutwas for the script. Output with facepalm1.gif and facepalm2.gif which yiels 0 pages with pdflatex code.tex and xelatex code.tex

r-environment-dictionary/translator-environment-dictionary-English.dict)
(/usr/local/texlive/2017/texmf-dist/tex/latex/beamer/translator/dicts/translato
r-months-dictionary/translator-months-dictionary-English.dict)
(/usr/local/texlive/2017/texmf-dist/tex/latex/beamer/translator/dicts/translato
r-numbers-dictionary/translator-numbers-dictionary-English.dict)
(/usr/local/texlive/2017/texmf-dist/tex/latex/beamer/translator/dicts/translato
r-theorem-dictionary/translator-theorem-dictionary-English.dict)
No file test.nav.
after EOF
(./test.stdout) (./test.aux) )
No pages of output.
Transcript written on test.log.

Output with pdflatex -shell-escape code.tex: correct!

Testing cfr second answer

Corrected working code with removal of ./anim to ./ and changed sh to bash (cfr)

\documentclass{beamer}
\usepackage{bashful,animate,pgffor}
\begin{document}
\bash
find . -name '*.gif' -execdir bash -c 'for i;
  do
   c=$(convert -coalesce -identify "$i" "${i/\.gif/.png}" | wc -l);
   ((c--));
   printf \%b "$(basename ${i/\.gif/})/$c,";
  done' bash {} + | sed 's/,$//'
\END
\begin{frame}
  \centering
  \foreach \i/\j in \bashStdout {\animategraphics[width=.2\linewidth,controls,autoplay,loop]{12}{\i-}{0}{\j} \\ }
\end{frame}
\end{document}

Files

masi@masi:~/Desktop/test.animate/anim$ ls
horna.gif  horn.gif   test2.log  test2.sh
hornb.gif  test2.aux  test2.out  test2.tex

Output after compilation with pdflatex -shell-escape test2.tex when sh there

(/usr/local/texlive/2017/texmf-dist/tex/latex/beamer/translator/dicts/translato
r-theorem-dictionary/translator-theorem-dictionary-English.dict)
No file test2.nav.

Standard error not empty. Here is how 
file test2.stderr begins: 
>>>>sh: 3: sh: Bad substitution 
>>>> 
but, you really ought to examine this file yourself!
! Your shell script failed....
\checkScriptErrors@BL ...r shell script failed...}
                                                  \BL@verbosetrue \logBL {Sw...
l.11 \END

? 
L11: Switching to verbose mode
L11: Checking whether any listings are required
L11: Nothing has to be listed
L11: Defining macro for the contents of the standard output file
L11: Opened file test2.stdout
L11: Reading contents of test2.stdout
after EOF
L11: bashStdout :=
/0,/0,/0

L11: Closing file test2.stdout
L11: Defining macro for the contents of the standard error file
L11: Opened file test2.stderr
L11: Reading contents of test2.stderr
L11: bashStderr :=
sh: 3: sh: Bad substitution

L11: Closing file test2.stderr
L11: Wrap up done
L11: bashV: Done!

! Package animate Error: None of the files
(animate)                `-0.pdf',
(animate)                `-0.mps',
(animate)                `-0.png',
(animate)                `-0.jpg',
(animate)                `-0.jpeg',
(animate)                `-0.jbig2',
(animate)                `-0.jb2',
(animate)                `-0.jp2',
(animate)                `-0.j2k' or
(animate)                `-0.jpx',
(animate)                could be found.
(animate)                Wrong file type? Mis-spelled file name?.

See the animate package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.15 \end{frame}

Output with sh: no .gif animations in pdf, no pdf produced in Fig. 1

Fig. 1 cfr code output when sh used

enter image description here

test2.stderr content when sh used

sh: 3: sh: Bad substitution
sh: 4: sh: c--: not found
sh: 5: sh: Bad substitution
sh: 3: sh: Bad substitution
sh: 4: sh: c--: not found
sh: 5: sh: Bad substitution
sh: 3: sh: Bad substitution
sh: 4: sh: c--: not found
sh: 5: sh: Bad substitution

Solution: change the original sh parts to bash as proposed by cfr. Output pdflatex -shell-escape test2.tex: correct!

OS: Debian 8.7
TexLive: 2017

  • 7
    The stuff i do in the terminal, i do in the terminal. I don't use another tool for a different purpose, whack it until it does the job i could have done five minutes ago. I consider it a waste of time to use tools that aren't meant for the task. – Johannes_B Jun 11 '17 at 10:34
  • 3
    What are you counting? The only script you show seems to be converting things. And the pseudoscript doesn't seem to be counting anything either. – cfr Jun 24 '17 at 3:36
  • 2
    Seems it is pretty hard to make a cow fly. – Johannes_B Jun 25 '17 at 6:19
  • @LéoLéopoldHertz준영 That would only be a valid reason if you would solve the problems on your own, not outsource them to other people. – user36296 Jun 26 '17 at 10:47
  • 2
    As I say, on your system, you will need to specify bash rather than sh as sh is evidently not bash. – cfr Jun 26 '17 at 11:18
13
+100

First, I think this is a bad idea. There's no good reason to run convert as part of running pdflatex. That said, it can be done.

There are four basic steps.

  1. Determine which .gif files you want to animate.
  2. Convert foo.gif into foo-0.png, foo-1.png, ..., foo-n.png.
  3. Determine n.
  4. Make the figure.

For step 1, you could use bashful to find all of the .gif files, or you could do something a little more sane and simply write down which ones you want to convert. I'll show both methods.

For step 2, you absolutely should just run convert yourself, but you wanted to do it with bashful, so that's what this answer does.

For step 3, you could use bashful, and I guess if you did steps 1 or 2 using bashful, you might as well; however, there's no need. We can do this easily enough in TeX, so that's what this answer does.

For step 4, you merely need to execute \animategraphics with the appropriate arguments.

Here's my code.

\documentclass{beamer}
\usepackage{animate}
\usepackage{bashful}

\newcount\seriesmax
\newread\seriesfile

% Count how many files are in the series.
\newcommand*\countseries[1]{%
        \seriesmax=0
        \loop
                \openin\seriesfile=#1-\number\seriesmax.png
        \ifeof\seriesfile\else
                \closein\seriesfile
                \advance\seriesmax by1
        \repeat
        \advance\seriesmax by-1
}

% This is just ridiculous. This should not be done from within LaTeX.
\begingroup
\catcode`\^^A=14
\catcode`\%=12
\gdef\explodegif#1{^^A
        \bashIV{convert -coalesce #1.gif '#1-%d.png'}^^A
}
\endgroup

\newcommand*\makegraphic[1]{%
        \countseries{#1}%
        \ifnum\seriesmax<0
                \explodegif{#1}%
                \countseries{#1}%
                \ifnum\seriesmax<0
                        \nosuchseries
                \fi
        \fi
        \begin{figure}%
                \noindent
                \animategraphics[width=\textwidth,controls,autoplay,loop]%
                        {12}{#1-}{0}{\number\seriesmax}%
        \end{figure}%
}

\begin{document}
% Downloaded from https://media.giphy.com/media/3og0INyCmHlNylks9O/giphy-downsized.gif
% and https://media.giphy.com/media/XsUtdIeJ0MWMo/giphy-downsized.gif
% and renamed to facepalm.gif and facepalm2.gif, respectively.

% One option is to specify exactly what you want.
%\makegraphic{facepalm}
%\makegraphic{facepalm2}

% The other option is to have `\bash` find them for you.
\bash
for i in *.gif; do echo "\makegraphic{$(basename $i .gif)}"; done
\END
\input\csname BL@stdoutFile\endcsname

\end{document}

Here're the images I'm going to work with. facepalm.gif facepalm2.gif

As the comment in the code says, I've renamed them to facepalm.gif and facepalm2.gif.

I've created a macro \makegraphic that takes as an argument the base name (in this case facepalm or facepalm2). The first thing it tries to do is to count the number of .png files by opening them one at a time until one fails to open. If it turns out that none of them exist, then it executes \explodegif to call convert. It tries a second time to count the number of .png files. If this fails, TeX stops. (I could have used a real error message, but this is just for demonstration so an undefined control sequence works just fine.)

Converting the .gif is done by executing one of the internal bashful macros. The reason for this is \bash mucks about with character codes and eventually looks for ^^M#1^^M\END where ^^M is active. Initially, I did similar tricks in order to make \bash work, but in the end, \bashIV{shell commands here} was just easier to do. Note that I needed to make % a normal symbols character so I made ^^A a comment for use in the macro.

In the end, the result is what you want. They are animated although, obviously, my screenshot is not.

enter image description here

  • 4
    @TH: +1 for the solution and if I could, +100 for using the images Jean Luc Picard ;-) – user31729 Jun 24 '17 at 20:56
  • 1
    @LéoLéopoldHertz준영 I'm using TeX Live 2017 on macOS. – TH. Jun 24 '17 at 22:32
  • @LéoLéopoldHertz준영: I have not use this code by TH's (yet), but I do trust his/her expertise that the result of the code is what he posted – user31729 Jun 24 '17 at 23:12
  • 1
    @LéoLéopoldHertz준영 (I'm away from a computer so I can't do much right now, but did you run pdflatex -shell-escape foo.tex twice? On the first run, it should execute convert and produce the .pdfs. Does this happen? The second run is necessary according to the animate documentation. Are the gifs in the same directory as the .tex? – TH. Jun 24 '17 at 23:53
  • 5
    @LéoLéopoldHertz준영 it's needed for bashful to work. It would be quite dangerous if compiling a document could execute arbitrary code by default. – TH. Jun 25 '17 at 13:18
5

This is an answer to the current version of the question.

Note that I do not see the attraction of this and do not recommend it.

Caveat emptor

Configuration for testing purposes:

  • A .tex file with content specified below in the working directory.
  • A sub-directory anim.
  • Three animated GIFs for conversion: anim/horn.gif, anim/horna.gif and anim/hornb.gif. All animations are the work of Danjiro Daiwa and can be found at https://codepen.io/danjiro/post/how-to-make-animated-gif-from-openclipart. To compile the example, download this animation, name it horn.gif and then make two copies, horna.gif and hornb.gif. (You can actually name them what you want as long as they have the extension .gif, but to duplicate what I did, name as specified.)

\documentclass{beamer}
\usepackage{bashful,animate,pgffor}
\begin{document}
\bash
find ./anim -name '*.gif' -execdir bash -c 'for i;
  do
   c=$(convert -coalesce -identify "$i" "${i/\.gif/.png}" | wc -l);
   ((c--));
   printf \%b "$(basename ${i/\.gif/})/$c,";
  done' bash {} + | sed 's/,$//'
\END
\begin{frame}
  \centering
  \foreach \i/\j in \bashStdout {\animategraphics[width=.2\linewidth,controls,autoplay,loop]{12}{anim/\i-}{0}{\j} \\ }
\end{frame}
\end{document}

3 animated horns

To adapt the code for another environment, edit to alter the ./anim appropriately in the find statement and the anim appropriately in the \animategraphics argument.

Note that my PDF viewer cannot actually run animations, so I cannot tell for sure if this works or not. I would be grateful if somebody could enlighten me.


As I say, I have no idea what the point of this is. How often are you going to want multiple animations in a single slide in some way you can manage using a loop? If you really have multiple animations in slides, you are just creating visual distractions for your audience.

But, this site is not about good ideas, but only the implementation of whatever ideas people happen to have, however misguided they may be. Otherwise, this answer would not exist.

Warning! Do not try this at home. Not recommended with or without parental guidance, but if you must do it, consider sparing your parents the heartache.


EDIT

Here's a version for use in the same directory.

Setup: working directory contains

horn.gif horna.gif hornb.gif test2.tex

test2.tex:

\documentclass{beamer}
\usepackage{bashful,animate,pgffor}
\begin{document}
\bash
find . -name '*.gif' -execdir bash -c 'for i;
  do
   c=$(convert -coalesce -identify "$i" "${i/\.gif/.png}" | wc -l);
   ((c--));
   printf \%b "$(basename ${i/\.gif/})/$c,";
  done' bash {} + | sed 's/,$//'
\END
\begin{frame}
  \centering
  \foreach \i/\j in \bashStdout {\animategraphics[width=.2\linewidth,controls,autoplay,loop]{12}{\i-}{0}{\j} \\ }
\end{frame}
\end{document}

test2.sh should contain:

% find . -name '*.gif' -execdir bash -c 'for i;
  do
   c=$(convert -coalesce -identify "$i" "${i/\.gif/.png}" | wc -l);
   ((c--));
   printf \%b "$(basename ${i/\.gif/})/$c,";
  done' bash {} + | sed 's/,$//'

test2.stdout should contain (with no newline at the end):

horna/9,hornb/9,horn/9

test2.stderr should be empty.

test2.log should include:

\openout5 = `test2.sh'.

runsystem(bash -c "bash test2.sh >test2.stdout 2>test2.stderr || echo $? >test2
.exitCode")...executed.

\openout5 = `test2.sh'.


after EOF
<horna-0.png, id=24, 321.2pt x 321.2pt>
File: horna-0.png Graphic file (type png)
<use horna-0.png>
Package pdftex.def Info: horna-0.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./horna-0.png> <a0,fr0>
<horna-1.png, id=33, 321.2pt x 321.2pt>
File: horna-1.png Graphic file (type png)
<use horna-1.png>
Package pdftex.def Info: horna-1.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./horna-1.png> <a0,fr1>
<horna-2.png, id=42, 321.2pt x 321.2pt>
File: horna-2.png Graphic file (type png)
<use horna-2.png>
Package pdftex.def Info: horna-2.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./horna-2.png> <a0,fr2>
<horna-3.png, id=51, 321.2pt x 321.2pt>
File: horna-3.png Graphic file (type png)
<use horna-3.png>
Package pdftex.def Info: horna-3.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./horna-3.png> <a0,fr3>
<horna-4.png, id=60, 321.2pt x 321.2pt>
File: horna-4.png Graphic file (type png)
<use horna-4.png>
Package pdftex.def Info: horna-4.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./horna-4.png> <a0,fr4>
<horna-5.png, id=69, 321.2pt x 321.2pt>
File: horna-5.png Graphic file (type png)
<use horna-5.png>
Package pdftex.def Info: horna-5.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./horna-5.png> <a0,fr5>
<a0,fr6> <a0,fr7> <a0,fr8> <a0,fr9>
<hornb-0.png, id=108, 321.2pt x 321.2pt>
File: hornb-0.png Graphic file (type png)
<use hornb-0.png>
Package pdftex.def Info: hornb-0.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./hornb-0.png> <a1,fr0>
<hornb-1.png, id=117, 321.2pt x 321.2pt>
File: hornb-1.png Graphic file (type png)
<use hornb-1.png>
Package pdftex.def Info: hornb-1.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./hornb-1.png>
<a1,fr1>
<hornb-2.png, id=126, 321.2pt x 321.2pt>
File: hornb-2.png Graphic file (type png)
<use hornb-2.png>
Package pdftex.def Info: hornb-2.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./hornb-2.png> <a1,fr2>
<hornb-3.png, id=135, 321.2pt x 321.2pt>
File: hornb-3.png Graphic file (type png)
<use hornb-3.png>
Package pdftex.def Info: hornb-3.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./hornb-3.png> <a1,fr3>
<hornb-4.png, id=144, 321.2pt x 321.2pt>
File: hornb-4.png Graphic file (type png)
<use hornb-4.png>
Package pdftex.def Info: hornb-4.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./hornb-4.png>
<a1,fr4>
<hornb-5.png, id=153, 321.2pt x 321.2pt>
File: hornb-5.png Graphic file (type png)
<use hornb-5.png>
Package pdftex.def Info: hornb-5.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./hornb-5.png> <a1,fr5> <a1,fr6> <a1,fr7> <a1,fr8> <a1,fr9>
<horn-0.png, id=191, 321.2pt x 321.2pt>
File: horn-0.png Graphic file (type png)
<use horn-0.png>
Package pdftex.def Info: horn-0.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./horn-0.png> <a2,fr0>
<horn-1.png, id=200, 321.2pt x 321.2pt>
File: horn-1.png Graphic file (type png)
<use horn-1.png>
Package pdftex.def Info: horn-1.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./horn-1.png> <a2,fr1>
<horn-2.png, id=209, 321.2pt x 321.2pt>
File: horn-2.png Graphic file (type png)
<use horn-2.png>
Package pdftex.def Info: horn-2.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./horn-2.png> <a2,fr2>
<horn-3.png, id=218, 321.2pt x 321.2pt>
File: horn-3.png Graphic file (type png)
<use horn-3.png>
Package pdftex.def Info: horn-3.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./horn-3.png>
<a2,fr3>
<horn-4.png, id=227, 321.2pt x 321.2pt>
File: horn-4.png Graphic file (type png)
<use horn-4.png>
Package pdftex.def Info: horn-4.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./horn-4.png> <a2,fr4>
<horn-5.png, id=236, 321.2pt x 321.2pt>
File: horn-5.png Graphic file (type png)
<use horn-5.png>
Package pdftex.def Info: horn-5.png  used on input line 15. on input line 15.
Package pdftex.def Info: Requested size: 321.19922pt x 321.19922pt on input lin
e 15.
 <./horn-5.png> <a2,fr5> <a2,fr6> <a2,fr7>
<a2,fr8> <a2,fr9>

EDIT EDIT Specify bash rather than sh in case sh is something else.

  • 1
    My code seems a bit short in comparison with the question, let alone the other answer. Did I miss something out? Worried because I can't actually test the animation part. – cfr Jun 25 '17 at 0:14
  • 1
    I can't test now but it looks reasonable. The only real difference is yours runs convert on every invocation of pdflatex. – TH. Jun 25 '17 at 1:56
  • 1
    I probably should have mentioned it in my answer, but my goal was to minimize the use of bash since that's something that should be done separately from compiling the document. And just including gifs in whatever order find returns (locale-dependent?) seems like a bad plan. So the key idea was simply enumerating the files with a known pattern which isn't too hard. – TH. Jun 25 '17 at 2:05
  • 2
    @LéoLéopoldHertz준영 Did you set up the test environment as directed? To run the example, you need a sub-directory anim containing one or more GIFs. To get my output, it should contain horn.gif, horna.gif and hornb.gif. Or you can adapt the code to use a directory other than anim, of course. – cfr Jun 25 '17 at 12:17
  • 2
    @LéoLéopoldHertz준영 The ((c--)) is bash syntax. On my system, sh is a symbolic link to bash (although it makes a difference which name is used to invoke it, I think). Once I saw the standard error you posted, I realised this could not be the case on your system. (It couldn't be a version issue: ((c--)) is not at all some recently introduced feature - it is just standard and has been for years.) I figured using bash instead of sh was, therefore, the simplest solution. sh used to be distinct in my distro, too, but I guess it still is in yours. – cfr Jun 26 '17 at 12:16
2

[Originally a comment, but got ridiculous.]

Note that this answer addressed the question in its original form. I leave it here as it still attempts to explain why the OP's code is confused. However, it does not offer a positive suggestion, as that wasn't possible at the time.


What does this do?

\bash[stdoutFile=gif_series.tex]

    % AlexG, https://tex.stackexchange.com/a/373780/13173
        \animategraphics[
          width=\textwidth,
          controls,autoplay,loop
        ]{12}{out000}{00}{16} % TODO here {out000}{00}{16} for dynamics

    \END

\bash[stdoutFile=gif_series.tex] tells LaTeX to use bash to execute the script to follow, directing 'standard out' to the file gif_series.tex. This is any output the script would normally send to the terminal as output, as opposed to errors and so on. So, you'll get a new file gif_series.tex (if it doesn't already exist) with the non-error result of the script, if any.

    % AlexG, https://tex.stackexchange.com/a/373780/13173

bash won't know what to do with this. It isn't bash code. In LaTeX, it would be a comment, but bash will just give an error.

        \animategraphics[
          width=\textwidth,
          controls,autoplay,loop
        ]{12}{out000}{00}{16} % TODO here {out000}{00}{16} for dynamics

Might do something in LaTeX, but won't do anything in bash except give you errors.

The LaTeX stuff cannot be part of the script. If you want to split the GIF as part of the compilation, you can do so by having bash do that. You can also write the file list to a file and then input it back to LaTeX. Or you can save it to a variable and recover the value, if you have a relatively small file list. But you cannot do what you want in one step because bash is not LaTeX and LaTeX is not bash.

[You can use \splice, but then special characters are going to be difficult and it looks as if you need those here, even if it is not entirely clear what you are trying to do.]

  • 1
    Please, see the pseudocode, I made it clearer. The idea is to find the max iteration count of each image set. Apply this info to AlexG code foreach image type. – Léo Léopold Hertz 준영 Jun 24 '17 at 4:00

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.