/*------------------------------------------------------------------------------
 src/lib/djImage/imageOpCopy.cxx
 
 Copyright (c) 2004-2006 Darby Johnston.
 All rights reserved.
 Use is subject to license terms.
------------------------------------------------------------------------------*/

//#define DJ_DBG
#include "djImageOpCore.h"

namespace dj {

const Image ImageOpCopy::work(const InputList & in) const
{
  if (! in.size()) return Image();
  const Image & input = *in[0];
  
  DJ_DBG_FNC("dj::ImageOpCopy::work");

  // Setup.
  //
  Image out(workInfo(in));
  out.proxy(input.proxy());
  out.tagList(input.tagList());
  DJ_DBG_PRN("input = " << input);
  DJ_DBG_PRN("output = " << out);
  
  // Work.
  //
  pixelCopy(input, &out);
  
  return out;
}

}
