anchor.diff:                      {colorspace, "RGB"} | Filters1],
       Filters3 = case is_blurred(Filters2) of
                       true ->  Filters2 ++ [{quality}];
  -                    false -> Filters2 ++ [{sharpen_small}, {quality}]
  +                    false -> case Mime of
  +                                 <<"image/gif">> -> Filters2 ++ [{quality}];
  +                                 _ -> Filters2 ++ [{sharpen_small}, {quality}]
  +                             end
                  end,
       Filters4 = case proplists:get_value(background, Filters3) of
  -                    undefined -> [{background,"white"}, {layers,"flatten"} | Filters3];
  +                    undefined -> default_background(Mime) ++ Filters3;
                       _ -> Filters3
                  end,
   
  
positive.code: filter2arg({make_image, "application/pdf"}, Width, Height) ->
      RArg = ["-resize ", integer_to_list(Width),$x,integer_to_list(Height)],
      {Width, Height, RArg};
  filter2arg({make_image, _Mime}, Width, Height) ->
      {Width, Height, []};
  filter2arg({correct_orientation, Orientation}, Width, Height) ->
  
negative.code:                     z_utils:assert(EndWidth  < ?MAX_WIDTH, image_too_wide),
                      z_utils:assert(EndHeight < ?MAX_HEIGHT, image_too_high),
                      Args1   = lists:flatten(z_utils:combine(32, CmdArgs)),
                      ?DEBUG(Mime),
                      Cmd     = ["convert ", z_utils:os_filename(InFile++infile_suffix(Mime)), " ", Args1, " ", z_utils:os_filename(OutFile)],
                      file:delete(OutFile),
                      ok = filelib:ensure_dir(OutFile),
                      ?DEBUG(lists:flatten(Cmd)),
                      Result  = z_media_preview_server:exec(lists:flatten(Cmd), OutFile),
                      case filelib:is_regular(OutFile) of
                          true ->
  