anchor.diff:  
   -export([run/1, run/2]).
   
  --define(COMMAND(In, OutName), "gs -dNOPAUSE -dBATCH -dSAFER -sDEVICE=jpeg  -sOutputFile=\"" ++ OutName ++ "_%d.png\" -r200 -q \"" ++ In ++ "\" -c quit").
  --define(COMMAND2(In), "jpegtran -copy none -progressive \"" ++ In ++ "\"").
  +-define(COMMAND(In, OutName), "gs -dNOPAUSE -dBATCH -dSAFER -sDEVICE=jpeg  -sOutputFile=\"page_" ++ OutName ++ "_%d.png\" -r200 -q \"" ++ In ++ "\" -c quit").
  +-define(COMMAND2(In,Out), "jpegtran -copy none -progressive -outfile \""++Out++"\" \"" ++ In ++ "\"").
   
   run(File) -> run(File, []).
   
  
positive.code: 
  
  
  make_progressive_jpeg(List) ->
    [?COMMAND2(F) || F <- List].
  
  
  
  
negative.code:       case filelib:wildcard("*.jpg", PagesDir) of
          [] -> {error, Data};
          List ->
            List2 = case make_progressive_jpeg(PagesDir,List) of
                      {ok,List_} ->
                        [file:delete(Dir++"/"++Old) || Old <- List],
                        List_;
                      false -> List
                    end,
            JSON = jiffy:encode({
              [
                {name, list_to_binary(Name)},
                {dir, <<"pages">>},
                {length, length(List2)},
                {thumbs, [list_to_binary(T) || T <- List2]}
              ]
            }),
            JSONFile = Dir ++ "/" ++ Name ++ ".pages.json",
  