예제 #1
0
MagickPPExport int Magick::operator == (const Magick::Geometry& left_,
  const Magick::Geometry& right_)
{
  return((left_.aspect() == right_.aspect()) &&
    (left_.fillArea() == right_.fillArea()) &&
    (left_.greater() == right_.greater()) &&
    (left_.height() == right_.height()) &&
    (left_.isValid() == right_.isValid()) &&
    (left_.less() == right_.less()) &&
    (left_.limitPixels() == right_.limitPixels()) &&
    (left_.percent() == right_.percent()) &&
    (left_.width() == right_.width()) &&
    (left_.xOff() == right_.xOff()) &&
    (left_.yOff() == right_.yOff()));
}
예제 #2
0
int Magick::operator == ( const Magick::Geometry& left_,
			  const Magick::Geometry& right_ )
{
  return (
	  ( left_.isValid()   == right_.isValid() ) &&
	  ( left_.width()     == right_.width() ) &&
	  ( left_.height()    == right_.height() ) &&
	  ( left_.xOff()      == right_.xOff() ) &&
	  ( left_.yOff()      == right_.yOff() ) &&
	  ( left_.xNegative() == right_.xNegative() ) &&
	  ( left_.yNegative() == right_.yNegative() ) &&
	  ( left_.percent()   == right_.percent() ) &&
	  ( left_.aspect()    == right_.aspect() ) &&
	  ( left_.greater()   == right_.greater() ) &&
	  ( left_.less()      == right_.less() )
	  );
}
	//==============================================================================================
	const Magick::Geometry* MagickGeometry::CreateGeometry()
	{
		Magick::Geometry* result = new Magick::Geometry(Width, Height, Math::Abs(X), Math::Abs(Y), X < 0, Y < 0);
		result->percent(IsPercentage);
		result->aspect(IgnoreAspectRatio);
		result->less(Less);
		result->greater(Greater);

		return result;
	}
예제 #4
0
 ResizeTest(std::string fileName) {
     source.loadFile(fileName);
     for (int i=1; i<99; ++i) {
         Magick::Image image = source.getImage();
         image.magick("JPEG");
         image.quality(50);
         Magick::Geometry resizeGeometry;
         resizeGeometry.percent(true);
         resizeGeometry.width(i);
         resizeGeometry.height(i);
         image.resize(resizeGeometry);
         Magick::Blob blob;
         image.write(&blob);
         imghash::Source target((char*)blob.data(), blob.length());
         images.push_back(target);
     }
 }