You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: photoshop_imresize.m
    path of file: ./repos/gptoolbox/imageprocessing
    
    the code of the file until where you have to start completion: function rim = photoshop_imresize(im,z)
  % PHOTOSHOP_IMRESIZE resize an image like photoshop with a given zoom. If
  % zoomed in enough then faint lines appear separating pixels
  %
  % rim = photoshop_imresize(im,z)
  %

    
function rim = photoshop_imresize(im,z)
  % PHOTOSHOP_IMRESIZE resize an image like photoshop with a given zoom. If
  % zoomed in enough then faint lines appear separating pixels
  %
  % rim = photoshop_imresize(im,z)
  %
  % Inputs:
  %   im  image to show
  %   z  zoom amount, 
  % Outputs:
  %   rim  resized with pixel separators if necesary
  %

  % zoom scale should be either smaller than one or an integer
  if z > 1
    z = round(z);
  end