anchor.diff:      ReqWidth   = proplists:get_value(width, Filters),
       ReqHeight  = proplists:get_value(height, Filters),
       {CropPar,Filters1} = fetch_crop(Filters),
  -    {ResizeWidth,ResizeHeight,CropArgs} = calc_size(ReqWidth, ReqHeight, ImageWidth, ImageHeight, CropPar, Orientation),
  +    {ResizeWidth,ResizeHeight,CropArgs} = calc_size(ReqWidth, ReqHeight, ImageWidth, ImageHeight, CropPar, Orientation, is_enabled(upscale, Filters)),
       Filters2   = [  {make_image, Mime},
                       {correct_orientation, Orientation},
                       {resize, ResizeWidth, ResizeHeight, is_enabled(upscale, Filters)}, 
  
positive.code:     can_generate_preview/1,
  	out_mime/2,
      string2filter/2,
      cmd_args/2
  ]).
  
  -define(MAX_WIDTH,  5000).
  
negative.code:                 ReqWidth   = z_convert:to_integer(proplists:get_value(width, Filters)),
                  ReqHeight  = z_convert:to_integer(proplists:get_value(height, Filters)),
                  {CropPar,_Filters1} = fetch_crop(Filters),
                  {ResizeWidth,ResizeHeight,CropArgs} = calc_size(ReqWidth, ReqHeight, ImageWidth, ImageHeight, CropPar, Orientation, is_enabled(upscale, Filters)),
                  case CropArgs of
                      none -> 
                          case is_enabled(extent, Filters) of
  