pgmagick-0.6/0000755000076500000240000000000012620347020014157 5ustar hattori-hstaff00000000000000pgmagick-0.6/LICENSE0000644000076500000240000000204612620311264015167 0ustar hattori-hstaff00000000000000Copyright (c) 2010-2012 Hideo Hattori Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. pgmagick-0.6/Makefile0000644000076500000240000000145312620311264015623 0ustar hattori-hstaff00000000000000LIBS=-lboost_python -lGraphicsMagick++ SRC_DIR=src all: cd $(SRC_DIR) && make cp -p src/*.so pgmagick/ fastbuild: cd $(SRC_DIR) && make CC="ccache g++" cp -p src/*.so pgmagick/ TEST_DIR=test .PHONY: test test: cd $(TEST_DIR) && make profile_pg: cd example && python -m cProfile -o test.cprof pgmagick_prof.py cd example && pyprof2html test.cprof && mv html html_pg && rm test.cprof profile_im: cd example && python -m cProfile -o test.cprof pythonmagick_prof.py cd example && pyprof2html test.cprof && mv html html_im && rm test.cprof profile_4: cd example && sh profile.sh pypireg: python setup.py register python setup.py sdist upload clean: rm -rf pgmagick.* build dist temp cd $(SRC_DIR) && make clean rm -rf pgmagick/_pgmagick.so rm -rf pgmagick/*.pyc rm -rf test/*.png test/*.jpg pgmagick-0.6/MANIFEST.in0000644000076500000240000000011112620311264015707 0ustar hattori-hstaff00000000000000include Makefile include src/Makefile include LICENSE include README.rst pgmagick-0.6/pgmagick/0000755000076500000240000000000012620347020015741 5ustar hattori-hstaff00000000000000pgmagick-0.6/pgmagick/__init__.py0000644000076500000240000001656412620311264020067 0ustar hattori-hstaff00000000000000from pgmagick import _pgmagick def __init(): _pgmagick.InitializeMagick("./") __init() class Blob(_pgmagick.Blob): def __init__(self, *args): if len(args) == 1 and isinstance(args[0], str): _pgmagick.Blob.__init__(self) self.update(args[0]) else: _pgmagick.Blob.__init__(self, *args) data = property(_pgmagick.get_blob_data, _pgmagick.Blob.update) ChannelType = _pgmagick.ChannelType class Color(_pgmagick.Color): pass class ColorGray(_pgmagick.ColorGray): pass class ColorHSL(_pgmagick.ColorHSL): pass class ColorMono(_pgmagick.ColorMono): pass class ColorRGB(_pgmagick.ColorRGB): pass class ColorYUV(_pgmagick.ColorYUV): pass ColorspaceType = _pgmagick.ColorspaceType CompositeOperator = _pgmagick.CompositeOperator CompressionType = _pgmagick.CompressionType class Coordinate(_pgmagick.Coordinate): pass class CoordinateList(_pgmagick.CoordinateList): pass DecorationType = _pgmagick.DecorationType class Drawable(_pgmagick.Drawable): pass class DrawableAffine(_pgmagick.DrawableAffine): pass class DrawableArc(_pgmagick.DrawableArc): pass class DrawableBezier(_pgmagick.DrawableBezier): pass class DrawableCircle(_pgmagick.DrawableCircle): pass class DrawableClipPath(_pgmagick.DrawableClipPath): pass class DrawableColor(_pgmagick.DrawableColor): pass class DrawableCompositeImage(_pgmagick.DrawableCompositeImage): pass class DrawableDashArray(_pgmagick.DrawableDashArray): pass class DrawableDashOffset(_pgmagick.DrawableDashOffset): pass class DrawableEllipse(_pgmagick.DrawableEllipse): pass class DrawableFillColor(_pgmagick.DrawableFillColor): pass class DrawableFillOpacity(_pgmagick.DrawableFillOpacity): pass class DrawableFillRule(_pgmagick.DrawableFillRule): pass class DrawableFont(_pgmagick.DrawableFont): pass class DrawableGravity(_pgmagick.DrawableGravity): pass class DrawableLine(_pgmagick.DrawableLine): pass class DrawableList(_pgmagick.DrawableList): pass class DrawableMatte(_pgmagick.DrawableMatte): pass class DrawableMiterLimit(_pgmagick.DrawableMiterLimit): pass class DrawablePath(_pgmagick.DrawablePath): pass class DrawablePoint(_pgmagick.DrawablePoint): pass class DrawablePointSize(_pgmagick.DrawablePointSize): pass class DrawablePolygon(_pgmagick.DrawablePolygon): pass class DrawablePolyline(_pgmagick.DrawablePolyline): pass class DrawablePopClipPath(_pgmagick.DrawablePopClipPath): pass class DrawablePopGraphicContext(_pgmagick.DrawablePopGraphicContext): pass class DrawablePopPattern(_pgmagick.DrawablePopPattern): pass class DrawablePushClipPath(_pgmagick.DrawablePushClipPath): pass class DrawablePushGraphicContext(_pgmagick.DrawablePushGraphicContext): pass class DrawablePushPattern(_pgmagick.DrawablePushPattern): pass class DrawableRectangle(_pgmagick.DrawableRectangle): pass class DrawableRotation(_pgmagick.DrawableRotation): pass class DrawableRoundRectangle(_pgmagick.DrawableRoundRectangle): pass class DrawableScaling(_pgmagick.DrawableScaling): pass class DrawableSkewX(_pgmagick.DrawableSkewX): pass class DrawableSkewY(_pgmagick.DrawableSkewY): pass class DrawableStrokeAntialias(_pgmagick.DrawableStrokeAntialias): pass class DrawableStrokeColor(_pgmagick.DrawableStrokeColor): pass class DrawableStrokeLineCap(_pgmagick.DrawableStrokeLineCap): pass class DrawableStrokeLineJoin(_pgmagick.DrawableStrokeLineJoin): pass class DrawableStrokeOpacity(_pgmagick.DrawableStrokeOpacity): pass class DrawableStrokeWidth(_pgmagick.DrawableStrokeWidth): pass class DrawableText(_pgmagick.DrawableText): pass class DrawableTextAntialias(_pgmagick.DrawableTextAntialias): pass class DrawableTextDecoration(_pgmagick.DrawableTextDecoration): pass class DrawableTextUnderColor(_pgmagick.DrawableTextUnderColor): pass class DrawableTranslation(_pgmagick.DrawableTranslation): pass class DrawableViewbox(_pgmagick.DrawableViewbox): pass EndianType = _pgmagick.EndianType class MagickException(_pgmagick.Exception): """Exception Class""" pass FillRule = _pgmagick.FillRule FilterTypes = _pgmagick.FilterTypes class Geometry(_pgmagick.Geometry): pass GravityType = _pgmagick.GravityType class Image(_pgmagick.Image): pass class ImageList(_pgmagick.ImageList): pass ImageType = _pgmagick.ImageType InterlaceType = _pgmagick.InterlaceType LineCap = _pgmagick.LineCap LineJoin = _pgmagick.LineJoin class Montage(_pgmagick.Montage): pass class MontageFramed(_pgmagick.MontageFramed): pass NoiseType = _pgmagick.NoiseType if hasattr(_pgmagick, "OrientationType"): OrientationType = _pgmagick.OrientationType PaintMethod = _pgmagick.PaintMethod class PathArcAbs(_pgmagick.PathArcAbs): pass class PathArcArgs(_pgmagick.PathArcArgs): pass class PathArcArgsList(_pgmagick.PathArcArgsList): pass class PathArcRel(_pgmagick.PathArcRel): pass class PathClosePath(_pgmagick.PathClosePath): pass class PathCurveToArgsList(_pgmagick.PathCurveToArgsList): pass class PathCurvetoAbs(_pgmagick.PathCurvetoAbs): pass class PathCurvetoArgs(_pgmagick.PathCurvetoArgs): pass class PathCurvetoRel(_pgmagick.PathCurvetoRel): pass class PathLinetoAbs(_pgmagick.PathLinetoAbs): pass class PathLinetoHorizontalAbs(_pgmagick.PathLinetoHorizontalAbs): pass class PathLinetoHorizontalRel(_pgmagick.PathLinetoHorizontalRel): pass class PathLinetoRel(_pgmagick.PathLinetoRel): pass class PathLinetoVerticalAbs(_pgmagick.PathLinetoVerticalAbs): pass class PathLinetoVerticalRel(_pgmagick.PathLinetoVerticalRel): pass class PathMovetoAbs(_pgmagick.PathMovetoAbs): pass class PathMovetoRel(_pgmagick.PathMovetoRel): pass class PathQuadraticCurvetoAbs(_pgmagick.PathQuadraticCurvetoAbs): pass class PathQuadraticCurvetoArgs(_pgmagick.PathQuadraticCurvetoArgs): pass class PathQuadraticCurvetoArgsList(_pgmagick.PathQuadraticCurvetoArgsList): pass class PathQuadraticCurvetoRel(_pgmagick.PathQuadraticCurvetoRel): pass class PathSmoothCurvetoAbs(_pgmagick.PathSmoothCurvetoAbs): pass class PathSmoothCurvetoRel(_pgmagick.PathSmoothCurvetoRel): pass class PathSmoothQuadraticCurvetoAbs(_pgmagick.PathSmoothQuadraticCurvetoAbs): pass class PathSmoothQuadraticCurvetoRel(_pgmagick.PathSmoothQuadraticCurvetoRel): pass class Pixels(_pgmagick.Pixels): pass if hasattr(_pgmagick, "SparseColorMethod"): SparseColorMethod = _pgmagick.SparseColorMethod if hasattr(_pgmagick, "DistortImageMethod"): DistortImageMethod = _pgmagick.DistortImageMethod if hasattr(_pgmagick, "QuantumOperator"): QuantumOperator = _pgmagick.QuantumOperator QuantumType = _pgmagick.QuantumType RenderingIntent = _pgmagick.RenderingIntent ResolutionType = _pgmagick.ResolutionType StorageType = _pgmagick.StorageType StretchType = _pgmagick.StretchType StyleType = _pgmagick.StyleType class TypeMetric(_pgmagick.TypeMetric): pass if hasattr(_pgmagick, "VirtualPixelMethod"): VirtualPixelMethod = _pgmagick.VirtualPixelMethod class VPath(_pgmagick.VPath): pass class VPathList(_pgmagick.VPathList): pass class gminfo: version = _pgmagick.get_version() library = _pgmagick.get_library() pgmagick-0.6/pgmagick/_version.py0000644000076500000240000000002412620346652020145 0ustar hattori-hstaff00000000000000__version__ = '0.6' pgmagick-0.6/pgmagick/api.py0000644000076500000240000007066112620346712017105 0ustar hattori-hstaff00000000000000import sys import pgmagick _EXIF_TAGS = [ "ImageWidth", "ImageLength", "BitsPerSample", "Compression", "PhotometricInterpretation", "ImageDescription", "Make", "Model", "StripOffsets", "Orientation", "SamplesPerPixel", "RowsPerStrip", "StripByteCounts", "XResolution", "YResolution", "PlanarConfiguration", "ResolutionUnit", "TransferFunction", "CreatorTool", "ModifyDate", "Artist", "WhitePoint", "PrimaryChromaticities", "JPEGInterchangeFormat", "JPEGInterchangeFormatLength", "YCbCrCoefficients", "YCbCrSubSampling", "YCbCrPositioning", "ReferenceBlackWhite", "Copyright", "ExposureTime", "FNumber", "ExifIFDPointer", "ExposureProgram", "SpectralSensitivity", "GPSInfoIFDPointer", "ISOSpeedRatings", "OECF", "ExifVersion", "DateTimeOriginal", "MetadataDate", "ComponentsConfiguration", "CompressedBitsPerPixel", "ShutterSpeedValue", "ApertureValue", "BrightnessValue", "ExposureBiasValue", "MaxApertureValue", "SubjectDistance", "MeteringMode", "LightSource", "Flash", "FocalLength", "SubjectArea", "MakerNote", "UserComment", "SubSecTime", "SubSecTimeOriginal", "SubSecTimeDegitized", "FlashpixVersion", "ColorSpace", "PixelXDimension", "PixelYDimension", "RelatedSoundFile", "InteroperabilityIFDPointer", "FlashEnergy", "SpatialFrequencyResponse", "FocalPlaneXResolution", "FocalPlaneYResolution", "FocalPlaneResolutionUnit", "SubjectLocation", "ExposureIndex", "SensingMethod", "FileSource", "SceneType", "CFAPattern", "CustomRendered", "ExposureMode", "WhiteBalance", "DigitalZoomRatio", "FocalLengthIn35mmFilm", "SceneCaptureType", "GainControl", "Contrast", "Saturation", "Sharpness", "DeviceSettingDescription", "SubjectDistanceRange", "0xa420", "0xa500", "DNGVersion", "DNGBackwardVersion", "DNGUniqueCameraModel", "DNGLocalizedCameraModel", "DNGCFAPlaneColor", "DNGCFALayout", "DNGLinearizationTable", "DNGBlackLevelRepeatDim", "DNGBlackLevel", "DNGBlackLevelDeltaH", "DNGBlackLevelDeltaV", "DNGWhiteLevel", "DNGDefaultscale", "DNGDefaultCropOrigin", "DNGDefaultCropSize", "DNGColorMatrix1", "DNGColorMatrix2", "DNGCameraCalibration1", "DNGCameraCalibration2", "DNGReductionMatrix1", "DNGReductionMatrix2", "DNGAnalogBalance", "DNGAsShotNeutral", "DNGAsShotWhiteXY", "DNGBaselineExposure", "DNGBaselineNoise", "DNGBaselineSharpness", "DNGBayerGreenSplit", "DNGLinearResponseLimit", "DNGCameraSerialNumber", "DNGLensInfo", "DNGChromaBlurRadius", "DNGAntiAliasStrength", "DNGShadowScale", "DNGPrivateData", "DNGMakerNoteSafety", "DNGCalibrationIlluminant1", "DNGCalibrationIlluminant2", "DNGBestQualityScale", "DNGRawDataUniqueID", "DNGOriginalRawFileName", "DNGOriginalRawFileData", "DNGActiveArea", "DNGMaskedArea", "DNGAsShotICCProfile", "DNGAsShotPreProfileMatrix", "DNGCurrentICCProfile", "DNGCurrentPreProfileMatrix", "GPSVersionID", "GPSLatitudeRef", "GPSLatitude", "GPSLongitudeRef", "GPSLongitude", "GPSAltitudeRef", "GPSAltitude", "GPSTimeStamp", "GPSSatellites", "GPSStatus", "GPSMessureMode", "GPSDOP", "GPSSpeedRef", "GPSSpeed", "GPSTrackRef", "GPSTrack", "GPSImgDirectionRef", "GPSImgDirection", "GPSMapDatum", "GPSDestLatitudeRef", "GPSDestLatitude", "GPSDestLongitudeRef", "GPSDestLongitude", "GPSDestBearingRef", "GPSDestBearing", "GPSDestDistanceRef", "GPSDestDistance", "GPSProcessingMethod", "GPSAreaInformation", "GPSDateStamp", "GPSDifferential", "InteroperabilityIndex", "CRSRawFileName", "CRSVersion", "CRSWhiteBalance", "CRSTemperature", "CRSTint", "CRSShadowTint", "CRSExposure", "CRSShadows", "CRSBrightness", "CRSContrast", "CRSSaturation", "CRSRedSaturation", "CRSGreenSaturation", "CRSBlueSaturation", "CRSSharpness", "CRSLuminanceSmoothing", "CRSRedHue", "CRSGreenHue", "CRSBlueHue", "CRSColorNoiseReduction", "CRSChromaticAberrationR", "CRSChromaticAberrationB", "CRSVignetteAmount", "CRSLens", "CRSSerialNumber", "CRSAutoBrightness", "CRSAutoShadows", "CRSAutoContrast", "CRSAutoExposure", "OLSpecialMode", "OLJpegQuality", "OLMacro", "OLDigitalZoom", "OLSoftwareRelease", "OLpictInfo", "OLCameraID", "OLDataDump", "OLFlashMode", "OLExposureBias", "OLFocusMode", "OLFocusDistance", "OLZoom", "OLMacroFocus", "OLSharpness", "OLColourMatrix", "OLBlackLevel", "OLWhiteBalance", "OLRedBias", "OLBlueBias", "OLSerialNumber", "OLFlashBias", "OLContrast", "OLSharpnessFactor", "OLColourControl", "OLValidBits", "OLCoringFilter", "OLImageWidth", "OLImageHeight", "OLCompressionRatio", "PXExposureTime", "PXFNumber", "PXISOSpeed", "PXExposureBias", "PXWhiteBalance", "PXLensID", "PXImageTone", "EXThumbInfo", "EXThumbSize", "EXThumbOffset", "EXQualityMode", "EXImageSize", "EXISOSensitivity", "EXWhiteBalance", "EXFocalLength", "EXSaturation", "EXContrast", "EXSharpness", "EXPIM", "EXThumbnail", "EXWBBias", "EXFlash", "EXObjectDistance", "EXFlashDistance", "EXRecordMode", "EXSelfTimer", "EXQuality", "EXFocusMode", "EXTimeZone", "EXBestshotMode", "EXCCDSensitivity", "EXColorMode", "EXColorEnhance", "EXFilter", "PXOCaptureMode", "PXOQualityLevel", "PXOFocusMode", "PXOFlashMode", "PXOWhiteBalance", "PXODigitalZoom", "PXOSharpness", "PXOContrast", "PXOSaturation", "PXOISOSpeed", "PXOColorMode", "PXOTimeZone", "PXODaylightSavings", "NKISOSetting", "NKColorMode", "NKQuality", "NKWhitebalance", "NKSharpness", "NKFocusMode", "NKFlashSetting", "NKFlashMode", "NKWhiteBalanceOffset", "NKISOselection", "NKThumbnailIFDOffset", "NKImageAdjustment", "NKContrastSetting", "NKAdapter", "NKLensSetting", "NKLensInfo", "NKManualFocusDistance", "NKDigitalZoom", "NKAFFocusPoint", "NKShutterMode", "NKColorSpace", "NKColorOffset", "NKNoiseReduction", "NKLendID", "NKShotCount", "NKFinishSetting", "NKDigitalImgProg", "NKEQuality", "NKEColorMode", "NKEImageAdjustment", "NKECCDSensitivity", "NKEWhiteBalance", "NKEFocus", "NKEDigitalZoom", "NKEConverter", "MLTMakerNoteVersion", "MLTCameraSettingsOld", "MLTExposureMode", "MLTFlashMode", "MLTWhiteBalance", "MLTImageSize", "MLTImageQuality", "MLTDriveMode", "MLTMeteringMode", "MLTFilmSpeed", "MLTShutterSpeed", "MLTAperture", "MLTMacroMode", "MLTDigitalZoom", "MLTExposureCompensation", "MLTBracketStep", "MLTunknown16", "MLTIntervalLength", "MLTIntervalNumber", "MLTFocalLength", "MLTFocusDistance", "MLTFlashFired", "MLTDate", "MLTTime", "MLTMaxAperture", "MLTFileNumberMemory", "MLTLastFileNumber", "MLTWhiteBalanceRed", "MLTWhiteBalanceGreen", "MLTWhiteBalanceBlue", "MLTSaturation", "MLTContrast", "MLTSharpness", "MLTSubjectProgram", "MLTFlashCompensation", "MLTISOSetting", "MLTCameraModel", "MLTIntervalMode", "MLTFolderName", "MLTColorMode", "MLTColorFilter", "MLTBWFilter", "MLTInternalFlash", "MLTBrightnessValue", "MLTSpotFocusPointX", "MLTSpotFocusPointY", "MLTWideFocusZone", "MLTFocusMode", "MLTFocusArea", "MLTDECPosition", "MLTComppressImageSize", "MLTThumbnail", "MLTThumbnailOffset", "MLTThumbnailLength", "MLTLensID", "MLTPIMInformation", "MLTCameraSettings", "SGSerialID", "SGDriveMode", "SGImageSize", "SGAFMode", "SGFocusMode", "SGWhiteBalance", "SGExposureMode", "SGMeteringMode", "SGFocalLength", "SGColorSpace", "SGExposure", "SGContrast", "SGShadow", "SGHighlight", "SGSaturation", "SGSharpness", "SGX3FillLight", "SGColorCoordination", "SGCustomSettingMode", "SGJpegQuality", "SGFirmware", "SGSoftware", "SGAutoBlacket", "CNMacroMode", "CNSelfTimer", "CNFlash", "CNDriveMode", "CNFocusMode", "CNImageSize", "CNImageSelect", "CNDigitalZoom", "CNContrast", "CNSaturation", "CNSharpness", "CNISOSensitive", "CNMeteringMode", "CNFocusType", "CNAFPoint", "CNExposurePorgram", "CNLensID", "CNLensMaximum", "CNLensMinimum", "CNLensUnit", "CNFlashDetailed", "CNFocusSetting", "CNImageStabilization", "CNImageEffect", "CNHueBias", "CNWhitebalance", "CNImageNumber", "CNAFPointUsed", "CNFlashBias", "CNAperture", "CNExposure", "CNNDFilter", "CNImageType", "CNFirmware", "CNUser", "CNSerial", "CNNoiseReduction", "CNButtunFunction", "CNMirrorLockUp", "CNShutterStep", "CNAFSupliment", "CNApexPriority", "CNAEFunction", "CNShutterSynchro", "CNAFStopButton", "CNFlashMemLimit", "CNMenuPosition", "CNSETFunction", "CNSensorCleaning", "CNColorTemp", "CNColorSpace", "FJVersion", "FJQuality", "FJSharpness", "FJWhiteBalance", "FJColor", "FJFlashMode", "FJFlashStrength", "FJMacro", "FJFocusMode", "FJSlowSync", "FJPictureMode", "FJContBlacket", "FJBlurWarning", "FJFocusWarning", "FJAEWarning", "KCMode", ] def _convert_colorobj(input_obj): if isinstance(input_obj, (list, tuple)): r, g, b = int(input_obj[0]), int(input_obj[1]), int(input_obj[2]) color = pgmagick.Color(r, g, b) elif isinstance(input_obj, str): color = pgmagick.Color(input_obj) else: color = input_obj assert isinstance(color, pgmagick.Color) return color def _convert_coordinatelist(input_obj): """convert from 'list' or 'tuple' object to pgmagick.CoordinateList. :type input_obj: list or tuple """ cdl = pgmagick.CoordinateList() for obj in input_obj: cdl.append(pgmagick.Coordinate(obj[0], obj[1])) return cdl def _convert_paintmethod(input_obj): if isinstance(input_obj, pgmagick.PaintMethod): return input_obj pm = pgmagick.PaintMethod() if input_obj.lower() == 'filltoborder': paint_method = pm.FillToBorderMethod else: paint_method = getattr(pm, "%sMethod" % input_obj.title()) return paint_method def _convert_vpathlist(input_obj): """convert from 'list' or 'tuple' object to pgmagick.VPathList. :type input_obj: list or tuple """ vpl = pgmagick.VPathList() for obj in input_obj: # FIXME obj = pgmagick.PathMovetoAbs(pgmagick.Coordinate(obj[0], obj[1])) vpl.append(obj) return vpl class Image(object): @property def height(self): return self.img.rows() @property def width(self): return self.img.columns() def __init__(self, filename=None, color=None, *args, **kargs): self.img = None if sys.version_info >= (3, ) and isinstance(filename, (str)): self.img = pgmagick.Image(str(filename)) elif sys.version_info < (3, ) and isinstance(filename, (unicode, str)): self.img = pgmagick.Image(str(filename)) elif isinstance(filename, (list, tuple)): size = filename geometry = pgmagick.Geometry(int(size[0]), int(size[1])) if isinstance(color, (list, tuple)): r, g, b = int(color[0]), int(color[1]), int(color[2]) color = pgmagick.Color(r, g, b) self.img = pgmagick.Image(geometry, color) elif isinstance(color, str): if color.find('gradient') == 0 or color.find('plasma') == 0: self.img = pgmagick.Image(geometry, pgmagick.Color()) self.img.read(color) else: color = pgmagick.Color(color) self.img = pgmagick.Image(geometry, color) else: self.img = pgmagick.Image(geometry, pgmagick.Color()) self.img.write(pgmagick.Blob(), 'MIFF') else: self.img = pgmagick.Image() def write(self, filename): self.img.write(str(filename)) # API of Manipulate An Image def adaptive_threshold(self, width, height, offset=0): # TODO: not implemented pass def add_noise(self, noise_type): # TODO: not implemented pass def add_noise_channel(self, channel, noise_type): # TODO: not implemented pass def affine_transform(self, affine): # TODO: not implemented pass def annotate(self, string, position=(0, 0), gravity='center', angle=0): position = pgmagick.Geometry(int(position[0]), int(position[1])) gravity = getattr(pgmagick.GravityType, "%sGravity" % gravity.title()) self.img.annotate(string, position, gravity, angle) def blur(self, radius=0.0, sigma=1.0): # TODO: not implemented pass def blur_channel(self, channel, radius=0.0, sigma=1.0): if isinstance(channel, str): channel = getattr(pgmagick.ChannelType, "%sChannel" % channel.title()) self.img.blurChannel(channel, radius, sigma) def border(self, geometry=None): # TODO: not implemented pass def channel(self, channel): # TODO: not implemented pass def channel_depth(self, channel, depth=None): # TODO: not implemented pass def charcoal(self, radius=0.0, sigma=1.0): # TODO: not implemented pass def chop(self, geometry): # TODO: not implemented pass def colorize(self, opacity_rgb, color): # TODO: not implemented pass def color_matrix(self, order, color_matrix): # TODO: not implemented pass def comment(self, comment): # TODO: not implemented pass def compare(self, reference): # TODO: not implemented pass def composite(self, composite_img, offset, compose=pgmagick.CompositeOperator.InCompositeOp): img = composite_img.img if type(composite_img) == Image else composite_img if isinstance(offset, (list, tuple)): x = int(offset[0]) y = int(offset[1]) offset = pgmagick.Geometry(x, y) elif isinstance(offset, pgmagick.Geometry): pass elif isinstance(offset, str): # is gravity (string) offset = getattr(pgmagick.GravityType, "%sGravity" % offset.title()) else: # is gravity (pgmagick.GravityType) pass if isinstance(compose, pgmagick.CompositeOperator): pass elif compose.lower() in ('copyblue', 'copygreen', 'copyopacity', 'copyred', 'copycyan', 'copymagenta', 'copyyellow', 'copyblack'): color = compose.lower().split('copy')[1].title() compose = getattr(pgmagick.CompositeOperator, "Copy%sCompositeOp" % color) else: # other string compose = getattr(pgmagick.CompositeOperator, "%sCompositeOp" % compose.title()) self.img.composite(img, offset, compose) def contrast(self, sharpen): # TODO: not implemented pass def convolve(self, order, kernel): # TODO: not implemented pass def crop(self, *geometry): if len(geometry) == 4: width, height = geometry[0], geometry[1] x, y = geometry[2], geometry[3] g = pgmagick.Geometry(x, y, width, height) elif len(geometry) == 1 and isinstance(geometry[0], pgmagick.Geometry): g = geometry[0] else: raise Exception("not support object", geometry) self.img.crop(g) def cycle_colormap(self, amount): # TODO: not implemented pass def draw(self, draw_obj): if isinstance(draw_obj, (list, tuple)): draw = pgmagick.DrawableList() for d in draw_obj: draw.append(d) elif isinstance(draw_obj, Draw): draw = draw_obj.drawer else: draw = draw_obj self.img.draw(draw) def edge(self, radius=0.0): # TODO: not implemented pass def emboss(self, radius=0.0, sigma=1.0): # TODO: not implemented pass def floodfill_color(self, point, fill_color): # TODO: not implemented pass def floodfill_opacity(self, point, opacity, method): # TODO: not implemented pass def floodfill_texture(self, point, texture): # TODO: not implemented pass def font(self, font=None): if font: self.img.font(font) else: return self.img.font() def scale(self, size, filter_type=None): if isinstance(size, float): scaled_height = self.img.rows() * size scaled_width = self.img.columns() * size size = "%dx%d" % (int(scaled_width), int(scaled_height)) elif isinstance(size, (list, tuple)): scaled_width, scaled_height = int(size[0]), int(size[1]) size = "%dx%d" % (int(scaled_width), int(scaled_height)) if filter_type: filter_type = getattr(pgmagick.FilterTypes, "%sFilter" % filter_type.title()) pgmagick.Image.filterType(self.img, filter_type) geometry = pgmagick.Geometry(size) self.img.scale(geometry) # API of Set/Get Image def font_pointsize(self, point_size=None): if point_size: point_size = float(point_size) self.img.fontPointsize(point_size) else: return self.img.fontPointsize() # extra def get_exif_info(self): """return exif-tag dict """ _dict = {} for tag in _EXIF_TAGS: ret = self.img.attribute("EXIF:%s" % tag) if ret and ret != 'unknown': _dict[tag] = ret return _dict class Draw(object): def __init__(self): self.drawer = pgmagick.DrawableList() def affine(self, sx, sy, rx, ry, tx, ty): affine = pgmagick.DrawableAffine(float(sx), float(sy), float(rx), float(ry), float(tx), float(ty)) self.drawer.append(affine) def arc(self, start_x, start_y, end_x, end_y, start_degrees, end_degrees): arc = pgmagick.DrawableArc(float(start_x), float(start_y), float(end_x), float(end_y), float(start_degrees), float(end_degrees)) self.drawer.append(arc) def bezier(self, points): """Draw a Bezier-curve. :param points: ex.) ((5, 5), (6, 6), (7, 7)) :type points: list """ coordinates = pgmagick.CoordinateList() for point in points: x, y = float(point[0]), float(point[1]) coordinates.append(pgmagick.Coordinate(x, y)) self.drawer.append(pgmagick.DrawableBezier(coordinates)) def circle(self, origin_x, origin_y, perim_x, perim_y): circle = pgmagick.DrawableCircle(float(origin_x), float(origin_y), float(perim_x), float(perim_y)) self.drawer.append(circle) def color(self, x, y, paint_method): """ :param paint_method: 'point' or 'replace' or 'floodfill' or 'filltoborder' or 'reset' :type paint_method: str or pgmagick.PaintMethod """ paint_method = _convert_paintmethod(paint_method) color = pgmagick.DrawableColor(x, y, paint_method) self.drawer.append(color) def composite(self, x, y, width, height, image, op=pgmagick.CompositeOperator.OverCompositeOp): if type(image) == Image: img = image.img else: img = image if width == 0 or height == 0: composite = pgmagick.DrawableCompositeImage(float(x), float(y), img) else: composite = pgmagick.DrawableCompositeImage(float(x), float(y), float(width), float(height), img, op) self.drawer.append(composite) def ellipse(self, org_x, org_y, radius_x, radius_y, arc_start, arc_end): """ :param org_x: origination x axis :param org_y: origination y axis :param radius_x: radius x axis :param radius_y: radius y axis :param arc_start: arc start angle :param arc_end: arc end angle """ ellipse = pgmagick.DrawableEllipse(float(org_x), float(org_y), float(radius_x), float(radius_y), float(arc_start), float(arc_end)) self.drawer.append(ellipse) def fill_color(self, color): color = _convert_colorobj(color) fill_color = pgmagick.DrawableFillColor(color) self.drawer.append(fill_color) def fill_rule(self, rule='evenodd'): if rule.lower() == 'evenodd': fill_rule = pgmagick.FillRule.EvenOddRule elif rule.lower() == 'nonzero': fill_rule = pgmagick.FillRule.NonZeroRule else: fill_rule = rule fill_rule = pgmagick.DrawableFillRule(fill_rule) self.drawer.append(fill_rule) def fill_opacity(self, opacity): """ :param opacity: 0.0 ~ 1.0 """ opacity = pgmagick.DrawableFillOpacity(float(opacity)) self.drawer.append(opacity) def font(self, family, style='normal', weight=400, stretch='normal'): style = getattr(pgmagick.StyleType, "%sStyle" % style.title()) stretch = stretch.lower() if 'condensed' in stretch: tmp = stretch.split('condensed')[0] stretch = "%sCondensedStretch" % tmp.title() elif 'expanded' in stretch: tmp = stretch.split('expanded')[0] stretch = "%sExpandedStretch" % tmp.title() else: stretch = "%sStretch" % stretch.title() stretch = getattr(pgmagick.StretchType, "%s" % stretch) if weight is 'bold': weight = 800 font = pgmagick.DrawableFont(family, style, weight, stretch) self.drawer.append(font) def gravity(self, gravity_type): if isinstance(gravity_type, str): gravity = getattr(pgmagick.GravityType, "%sGravity" % gravity_type.title()) else: gravity = gravity_type gravity_type = pgmagick.DrawableGravity(gravity) self.drawer.append(gravity_type) def line(self, start_x, start_y, end_x, end_y): line = pgmagick.DrawableLine(start_x, start_y, end_x, end_y) self.drawer.append(line) def matte(self, x, y, paint_method): """ :param paint_method: 'point' or 'replace' or 'floodfill' or 'filltoborder' or 'reset' :type paint_method: str or pgmagick.PaintMethod """ paint_method = _convert_paintmethod(paint_method) self.drawer.append(pgmagick.DrawableMatte(x, y, paint_method)) def miterlimit(self, miterlimit): # FIXME self.drawer.append(pgmagick.DrawableMiterLimit(miterlimit)) def path(self, vpath): # FIXME if isinstance(vpath, pgmagick.VPathList): vpath = vpath elif isinstance(vpath, (list, tuple)): vpath = _convert_vpathlist(vpath) self.drawer.append(pgmagick.DrawablePath(vpath)) def point(self, x, y): self.drawer.append(pgmagick.DrawablePoint(x, y)) def pointsize(self, pointsize): pointsize = pgmagick.DrawablePointSize(pointsize) self.drawer.append(pointsize) def polygon(self, coordinates): if isinstance(coordinates, pgmagick.CoordinateList): obj = coordinates elif isinstance(coordinates, (list, tuple)): obj = _convert_coordinatelist(coordinates) self.drawer.append(pgmagick.DrawablePolygon(obj)) def polyline(self, coordinates): if isinstance(coordinates, pgmagick.CoordinateList): obj = coordinates elif isinstance(coordinates, (list, tuple)): obj = _convert_coordinatelist(coordinates) self.drawer.append(pgmagick.DrawablePolyline(obj)) def rectangle(self, upperleft_x, upperleft_y, lowerright_x, lowerright_y): r = pgmagick.DrawableRectangle(upperleft_x, upperleft_y, lowerright_x, lowerright_y) self.drawer.append(r) def rotation(self, angle): self.drawer.append(pgmagick.DrawableRotation(angle)) def round_rectangle(self, center_x, center_y, width, height, corner_width, corner_height): rr = pgmagick.DrawableRoundRectangle(center_x, center_y, width, height, corner_width, corner_height) self.drawer.append(rr) def scaling(self, x, y): """Scaling Draw Object :param x: 0.0 ~ 1.0 :param y: 0.0 ~ 1.0 """ self.drawer.append(pgmagick.DrawableScaling(float(x), float(y))) def skewx(self, angle): self.drawer.append(pgmagick.DrawableSkewX(float(angle))) def skewy(self, angle): self.drawer.append(pgmagick.DrawableSkewY(float(angle))) def stroke_antialias(self, flag=True): """stroke antialias :param flag: True or False. (default is True) :type flag: bool """ antialias = pgmagick.DrawableStrokeAntialias(flag) self.drawer.append(antialias) def stroke_color(self, color): color = _convert_colorobj(color) color = pgmagick.DrawableStrokeColor(color) self.drawer.append(color) def stroke_linecap(self, linecap): """set to stroke linecap. :param linecap: 'undefined', 'butt', 'round', 'square' :type linecap: str """ linecap = getattr(pgmagick.LineCap, "%sCap" % linecap.title()) linecap = pgmagick.DrawableStrokeLineCap(linecap) self.drawer.append(linecap) def stroke_linejoin(self, linejoin): """set to stroke linejoin. :param linejoin: 'undefined', 'miter', 'round', 'bevel' :type linejoin: str """ linejoin = getattr(pgmagick.LineJoin, "%sJoin" % linejoin.title()) linejoin = pgmagick.DrawableStrokeLineJoin(linejoin) self.drawer.append(linejoin) def stroke_opacity(self, opacity): self.drawer.append(pgmagick.DrawableStrokeOpacity(float(opacity))) def stroke_width(self, width): width = float(width) width = pgmagick.DrawableStrokeWidth(width) self.drawer.append(width) def text(self, x, y, string, encoding=None): # TODO: unable encoding text = pgmagick.DrawableText(x, y, string) self.drawer.append(text) def text_antialias(self, flag=True): """text antialias :param flag: True or False. (default is True) :type flag: bool """ antialias = pgmagick.DrawableTextAntialias(flag) self.drawer.append(antialias) def text_decoration(self, decoration): """text decoration :param decoration: 'no', 'underline', 'overline', 'linethrough' :type decoration: str """ if decoration.lower() == 'linethrough': d = pgmagick.DecorationType.LineThroughDecoration else: decoration_type_string = "%sDecoration" % decoration.title() d = getattr(pgmagick.DecorationType, "%s" % decoration_type_string) decoration = pgmagick.DrawableTextDecoration(d) self.drawer.append(decoration) def text_undercolor(self, color): color = _convert_colorobj(color) undercolor = pgmagick.DrawableTextUnderColor(color) self.drawer.append(undercolor) def translate(self, x, y): self.drawer.append(pgmagick.DrawableTranslation(float(x), float(y))) pgmagick-0.6/pgmagick.egg-info/0000755000076500000240000000000012620347020017433 5ustar hattori-hstaff00000000000000pgmagick-0.6/pgmagick.egg-info/dependency_links.txt0000644000076500000240000000000112620347020023501 0ustar hattori-hstaff00000000000000 pgmagick-0.6/pgmagick.egg-info/PKG-INFO0000644000076500000240000001452612620347020020540 0ustar hattori-hstaff00000000000000Metadata-Version: 1.1 Name: pgmagick Version: 0.6 Summary: Yet Another Python wrapper for GraphicsMagick Home-page: http://bitbucket.org/hhatto/pgmagick Author: Hideo Hattori Author-email: hhatto.jp@gmail.com License: MIT Description: About ===== .. image:: https://travis-ci.org/hhatto/pgmagick.svg?branch=master :target: https://travis-ci.org/hhatto/pgmagick :alt: Build status pgmagick is a yet another boost.python based wrapper for GraphicsMagick. Installation ============ install to:: $ pip install pgmagick Requirements ============ Python2.5++, GraphicsMagick and Boost.Python. package install on Ubuntu(test on Ubuntu10.04+):: ### Ubuntu11.10+ ### $ apt-get install python-pgmagick ### Ubuntu10.04+ ### $ apt-get install libgraphicsmagick++1-dev $ apt-get install libboost-python1.40-dev package install on Fedora:: $ yum install GraphicsMagick-c++-devel $ yum install boost-devel GraphicsMagick from source package:: $ ./configure --enable-shared=yes $ make && make install MacOSX ------ via homebrew-cask(homebrew-pgmagick) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ use `homebrew-pgmagick`_ :: $ brew tap hhatto/pgmagick $ brew install pgmagick .. _`homebrew-pgmagick`: https://github.com/hhatto/homebrew-pgmagick via homebrew and pip ~~~~~~~~~~~~~~~~~~~~ *update 2014.05.12* on MacOSX 10.9.2 (add ARCHFLAGS):: $ brew install graphicsmagick $ brew install boost --with-python $ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install pgmagick *update 2013.08.31* with Homebrew_ :: $ brew install graphicsmagick # or imagemagick $ brew install boost --with-thread-unsafe --build-from-source $ pip install pgmagick install reported on MacOSX, Thanks Rohan Singh and Simon Harrison. - http://rohanradio.com/blog/2011/12/02/installing-pgmagick-on-os-x/ - http://simonharrison.info/talk/2011/01/17/pgmagick-on-mac-os/ (old) .. _Homebrew: http://brew.sh/ Windows ------- Now, not official support. However, *unofficial* binary packages exists. - http://www.lfd.uci.edu/~gohlke/pythonlibs/#pgmagick ImageMagick support ------------------- pgmagick is supported to ImageMagick library. (*version:0.4+*) package install on Ubuntu(test on Ubuntu10.04+):: $ apt-get install libmagick++-dev show library name and version:: >>> from pgmagick import gminfo >>> gminfo.library 'GraphicsMagick' # or 'ImageMagick' >>> gminfo.version '1.3.x' >>> Usage ===== scale example:: >>> from pgmagick import Image, FilterTypes >>> im = Image('input.jpg') >>> im.quality(100) >>> im.filterType(FilterTypes.SincFilter) >>> im.scale('100x100') >>> im.sharpen(1.0) >>> im.write('output.jpg') composite example:: >>> from pgmagick import Image, CompositeOperator as co >>> base = Image('base.png') >>> layer = Image('layer_one.png') >>> base.composite(layer, 100, 100, co.OverCompositeOp) >>> im.write('output.png') draw example:: >>> from pgmagick import Image, DrawableCircle, DrawableText, Geometry, Color >>> im = Image(Geometry(300, 300), Color("yellow")) >>> circle = DrawableCircle(100, 100, 20, 20) >>> im.draw(circle) >>> im.fontPointsize(65) >>> text = DrawableText(30, 250, "Hello pgmagick") >>> im.draw(text) >>> im.write('hoge.png') blob access:: >>> from pgmagick import Image, Blob, Geometry >>> blob = Blob(open('filename.jpg').read()) >>> blob.update(open('filename2.jpg').read()) >>> img = Image(blob, Geometry(600, 480)) >>> img.scale('300x200') >>> img.write('out.jpg') create animated-GIF:: from pgmagick import Image, ImageList, Geometry, Color imgs = ImageList() for color in ('red', 'blue', 'green', 'black', 'yellow'): imgs.append(Image(Geometry(200, 200), Color(color))) imgs.animationDelayImages(100) imgs.scaleImages(Geometry(100, 100)) imgs.writeImages('output.gif') more API detail... read to `Magick++ API for GraphicsMagick`_ document. .. _`Magick++ API for GraphicsMagick`: http://www.graphicsmagick.org/Magick++/ Python APIs(*NOTICE!! this api is alpha version!!*):: >>> from pgmagick.api import Image >>> img = Image((300, 300), "gradient:#ffffff-#000000") >>> img.scale(0.8) >>> img.write('out.png') Links ===== * PyPI_ * `Project Page`_ * `Project Page (Old)`_ * `CI(Jenkins)`_ .. _PyPI: http://pypi.python.org/pypi/pgmagick/ .. _`Project Page`: https://github.com/hhatto/pgmagick/ .. _`Project Page (Old)`: https://bitbucket.org/hhatto/pgmagick/ .. _`CI(Jenkins)`: http://jenkins.hexacosa.net/job/pgmagick/ Keywords: GraphicsMagick ImageMagick graphics boost image Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: POSIX Classifier: Programming Language :: C++ Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Topic :: Multimedia :: Graphics pgmagick-0.6/pgmagick.egg-info/SOURCES.txt0000644000076500000240000000654012620347020021324 0ustar hattori-hstaff00000000000000LICENSE MANIFEST.in Makefile README.rst setup.py ./src/_Blob.cpp ./src/_ChannelType.cpp ./src/_Color.cpp ./src/_ColorspaceType.cpp ./src/_CompositeOperator.cpp ./src/_CompressionType.cpp ./src/_Coordinate.cpp ./src/_DecorationType.cpp ./src/_DistortImageMethod.cpp ./src/_Drawable.cpp ./src/_DrawableAffine.cpp ./src/_DrawableArc.cpp ./src/_DrawableBezier.cpp ./src/_DrawableCircle.cpp ./src/_DrawableClipPath.cpp ./src/_DrawableColor.cpp ./src/_DrawableCompositeImage.cpp ./src/_DrawableDashArray.cpp ./src/_DrawableDashOffset.cpp ./src/_DrawableEllipse.cpp ./src/_DrawableFillColor.cpp ./src/_DrawableFillOpacity.cpp ./src/_DrawableFillRule.cpp ./src/_DrawableFont.cpp ./src/_DrawableGravity.cpp ./src/_DrawableLine.cpp ./src/_DrawableMatte.cpp ./src/_DrawableMiterLimit.cpp ./src/_DrawablePath.cpp ./src/_DrawablePoint.cpp ./src/_DrawablePointSize.cpp ./src/_DrawablePolygon.cpp ./src/_DrawablePolyline.cpp ./src/_DrawablePopClipPath.cpp ./src/_DrawablePopGraphicContext.cpp ./src/_DrawablePopPattern.cpp ./src/_DrawablePushClipPath.cpp ./src/_DrawablePushGraphicContext.cpp ./src/_DrawablePushPattern.cpp ./src/_DrawableRectangle.cpp ./src/_DrawableRotation.cpp ./src/_DrawableRoundRectangle.cpp ./src/_DrawableScaling.cpp ./src/_DrawableSkewX.cpp ./src/_DrawableSkewY.cpp ./src/_DrawableStrokeAntialias.cpp ./src/_DrawableStrokeColor.cpp ./src/_DrawableStrokeLineCap.cpp ./src/_DrawableStrokeLineJoin.cpp ./src/_DrawableStrokeOpacity.cpp ./src/_DrawableStrokeWidth.cpp ./src/_DrawableText.cpp ./src/_DrawableTextAntialias.cpp ./src/_DrawableTextDecoration.cpp ./src/_DrawableTextUnderColor.cpp ./src/_DrawableTranslation.cpp ./src/_DrawableViewbox.cpp ./src/_EndianType.cpp ./src/_Exception.cpp ./src/_FillRule.cpp ./src/_FilterTypes.cpp ./src/_Geometry.cpp ./src/_GravityType.cpp ./src/_Image.cpp ./src/_ImageType.cpp ./src/_InterlaceType.cpp ./src/_LineCap.cpp ./src/_LineJoin.cpp ./src/_Montage.cpp ./src/_NoiseType.cpp ./src/_OrientationType.cpp ./src/_PaintMethod.cpp ./src/_PathArcAbs.cpp ./src/_PathArcArgs.cpp ./src/_PathArcRel.cpp ./src/_PathClosePath.cpp ./src/_PathCurvetoAbs.cpp ./src/_PathCurvetoArgs.cpp ./src/_PathCurvetoRel.cpp ./src/_PathLinetoAbs.cpp ./src/_PathLinetoHorizontalAbs.cpp ./src/_PathLinetoHorizontalRel.cpp ./src/_PathLinetoRel.cpp ./src/_PathLinetoVerticalAbs.cpp ./src/_PathLinetoVerticalRel.cpp ./src/_PathMovetoAbs.cpp ./src/_PathMovetoRel.cpp ./src/_PathQuadraticCurvetoAbs.cpp ./src/_PathQuadraticCurvetoArgs.cpp ./src/_PathQuadraticCurvetoRel.cpp ./src/_PathSmoothCurvetoAbs.cpp ./src/_PathSmoothCurvetoRel.cpp ./src/_PathSmoothQuadraticCurvetoAbs.cpp ./src/_PathSmoothQuadraticCurvetoRel.cpp ./src/_Pixels.cpp ./src/_QuantumOperator.cpp ./src/_QuantumType.cpp ./src/_RenderingIntent.cpp ./src/_ResolutionType.cpp ./src/_STL.cpp ./src/_SparseColorMethod.cpp ./src/_StorageType.cpp ./src/_StretchType.cpp ./src/_StyleType.cpp ./src/_TypeMetric.cpp ./src/_VPath.cpp ./src/_VirtualPixelMethod.cpp ./src/_gminfo.cpp ./src/_main.cpp pgmagick/__init__.py pgmagick/_version.py pgmagick/api.py pgmagick.egg-info/PKG-INFO pgmagick.egg-info/SOURCES.txt pgmagick.egg-info/dependency_links.txt pgmagick.egg-info/top_level.txt src/Makefile test/test_cookbook.py test/test_pgmagick_api.py test/test_pgmagick_blob.py test/test_pgmagick_color.py test/test_pgmagick_geometry.py test/test_pgmagick_image.py test/test_pgmagick_imagelist.py test/test_pgmagick_libinfo.py test/test_pgmagick_montage.pypgmagick-0.6/pgmagick.egg-info/top_level.txt0000644000076500000240000000001112620347020022155 0ustar hattori-hstaff00000000000000pgmagick pgmagick-0.6/PKG-INFO0000644000076500000240000001452612620347020015264 0ustar hattori-hstaff00000000000000Metadata-Version: 1.1 Name: pgmagick Version: 0.6 Summary: Yet Another Python wrapper for GraphicsMagick Home-page: http://bitbucket.org/hhatto/pgmagick Author: Hideo Hattori Author-email: hhatto.jp@gmail.com License: MIT Description: About ===== .. image:: https://travis-ci.org/hhatto/pgmagick.svg?branch=master :target: https://travis-ci.org/hhatto/pgmagick :alt: Build status pgmagick is a yet another boost.python based wrapper for GraphicsMagick. Installation ============ install to:: $ pip install pgmagick Requirements ============ Python2.5++, GraphicsMagick and Boost.Python. package install on Ubuntu(test on Ubuntu10.04+):: ### Ubuntu11.10+ ### $ apt-get install python-pgmagick ### Ubuntu10.04+ ### $ apt-get install libgraphicsmagick++1-dev $ apt-get install libboost-python1.40-dev package install on Fedora:: $ yum install GraphicsMagick-c++-devel $ yum install boost-devel GraphicsMagick from source package:: $ ./configure --enable-shared=yes $ make && make install MacOSX ------ via homebrew-cask(homebrew-pgmagick) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ use `homebrew-pgmagick`_ :: $ brew tap hhatto/pgmagick $ brew install pgmagick .. _`homebrew-pgmagick`: https://github.com/hhatto/homebrew-pgmagick via homebrew and pip ~~~~~~~~~~~~~~~~~~~~ *update 2014.05.12* on MacOSX 10.9.2 (add ARCHFLAGS):: $ brew install graphicsmagick $ brew install boost --with-python $ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install pgmagick *update 2013.08.31* with Homebrew_ :: $ brew install graphicsmagick # or imagemagick $ brew install boost --with-thread-unsafe --build-from-source $ pip install pgmagick install reported on MacOSX, Thanks Rohan Singh and Simon Harrison. - http://rohanradio.com/blog/2011/12/02/installing-pgmagick-on-os-x/ - http://simonharrison.info/talk/2011/01/17/pgmagick-on-mac-os/ (old) .. _Homebrew: http://brew.sh/ Windows ------- Now, not official support. However, *unofficial* binary packages exists. - http://www.lfd.uci.edu/~gohlke/pythonlibs/#pgmagick ImageMagick support ------------------- pgmagick is supported to ImageMagick library. (*version:0.4+*) package install on Ubuntu(test on Ubuntu10.04+):: $ apt-get install libmagick++-dev show library name and version:: >>> from pgmagick import gminfo >>> gminfo.library 'GraphicsMagick' # or 'ImageMagick' >>> gminfo.version '1.3.x' >>> Usage ===== scale example:: >>> from pgmagick import Image, FilterTypes >>> im = Image('input.jpg') >>> im.quality(100) >>> im.filterType(FilterTypes.SincFilter) >>> im.scale('100x100') >>> im.sharpen(1.0) >>> im.write('output.jpg') composite example:: >>> from pgmagick import Image, CompositeOperator as co >>> base = Image('base.png') >>> layer = Image('layer_one.png') >>> base.composite(layer, 100, 100, co.OverCompositeOp) >>> im.write('output.png') draw example:: >>> from pgmagick import Image, DrawableCircle, DrawableText, Geometry, Color >>> im = Image(Geometry(300, 300), Color("yellow")) >>> circle = DrawableCircle(100, 100, 20, 20) >>> im.draw(circle) >>> im.fontPointsize(65) >>> text = DrawableText(30, 250, "Hello pgmagick") >>> im.draw(text) >>> im.write('hoge.png') blob access:: >>> from pgmagick import Image, Blob, Geometry >>> blob = Blob(open('filename.jpg').read()) >>> blob.update(open('filename2.jpg').read()) >>> img = Image(blob, Geometry(600, 480)) >>> img.scale('300x200') >>> img.write('out.jpg') create animated-GIF:: from pgmagick import Image, ImageList, Geometry, Color imgs = ImageList() for color in ('red', 'blue', 'green', 'black', 'yellow'): imgs.append(Image(Geometry(200, 200), Color(color))) imgs.animationDelayImages(100) imgs.scaleImages(Geometry(100, 100)) imgs.writeImages('output.gif') more API detail... read to `Magick++ API for GraphicsMagick`_ document. .. _`Magick++ API for GraphicsMagick`: http://www.graphicsmagick.org/Magick++/ Python APIs(*NOTICE!! this api is alpha version!!*):: >>> from pgmagick.api import Image >>> img = Image((300, 300), "gradient:#ffffff-#000000") >>> img.scale(0.8) >>> img.write('out.png') Links ===== * PyPI_ * `Project Page`_ * `Project Page (Old)`_ * `CI(Jenkins)`_ .. _PyPI: http://pypi.python.org/pypi/pgmagick/ .. _`Project Page`: https://github.com/hhatto/pgmagick/ .. _`Project Page (Old)`: https://bitbucket.org/hhatto/pgmagick/ .. _`CI(Jenkins)`: http://jenkins.hexacosa.net/job/pgmagick/ Keywords: GraphicsMagick ImageMagick graphics boost image Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: POSIX Classifier: Programming Language :: C++ Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Topic :: Multimedia :: Graphics pgmagick-0.6/README.rst0000644000076500000240000001051712620311264015653 0ustar hattori-hstaff00000000000000About ===== .. image:: https://travis-ci.org/hhatto/pgmagick.svg?branch=master :target: https://travis-ci.org/hhatto/pgmagick :alt: Build status pgmagick is a yet another boost.python based wrapper for GraphicsMagick. Installation ============ install to:: $ pip install pgmagick Requirements ============ Python2.5++, GraphicsMagick and Boost.Python. package install on Ubuntu(test on Ubuntu10.04+):: ### Ubuntu11.10+ ### $ apt-get install python-pgmagick ### Ubuntu10.04+ ### $ apt-get install libgraphicsmagick++1-dev $ apt-get install libboost-python1.40-dev package install on Fedora:: $ yum install GraphicsMagick-c++-devel $ yum install boost-devel GraphicsMagick from source package:: $ ./configure --enable-shared=yes $ make && make install MacOSX ------ via homebrew-cask(homebrew-pgmagick) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ use `homebrew-pgmagick`_ :: $ brew tap hhatto/pgmagick $ brew install pgmagick .. _`homebrew-pgmagick`: https://github.com/hhatto/homebrew-pgmagick via homebrew and pip ~~~~~~~~~~~~~~~~~~~~ *update 2014.05.12* on MacOSX 10.9.2 (add ARCHFLAGS):: $ brew install graphicsmagick $ brew install boost --with-python $ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install pgmagick *update 2013.08.31* with Homebrew_ :: $ brew install graphicsmagick # or imagemagick $ brew install boost --with-thread-unsafe --build-from-source $ pip install pgmagick install reported on MacOSX, Thanks Rohan Singh and Simon Harrison. - http://rohanradio.com/blog/2011/12/02/installing-pgmagick-on-os-x/ - http://simonharrison.info/talk/2011/01/17/pgmagick-on-mac-os/ (old) .. _Homebrew: http://brew.sh/ Windows ------- Now, not official support. However, *unofficial* binary packages exists. - http://www.lfd.uci.edu/~gohlke/pythonlibs/#pgmagick ImageMagick support ------------------- pgmagick is supported to ImageMagick library. (*version:0.4+*) package install on Ubuntu(test on Ubuntu10.04+):: $ apt-get install libmagick++-dev show library name and version:: >>> from pgmagick import gminfo >>> gminfo.library 'GraphicsMagick' # or 'ImageMagick' >>> gminfo.version '1.3.x' >>> Usage ===== scale example:: >>> from pgmagick import Image, FilterTypes >>> im = Image('input.jpg') >>> im.quality(100) >>> im.filterType(FilterTypes.SincFilter) >>> im.scale('100x100') >>> im.sharpen(1.0) >>> im.write('output.jpg') composite example:: >>> from pgmagick import Image, CompositeOperator as co >>> base = Image('base.png') >>> layer = Image('layer_one.png') >>> base.composite(layer, 100, 100, co.OverCompositeOp) >>> im.write('output.png') draw example:: >>> from pgmagick import Image, DrawableCircle, DrawableText, Geometry, Color >>> im = Image(Geometry(300, 300), Color("yellow")) >>> circle = DrawableCircle(100, 100, 20, 20) >>> im.draw(circle) >>> im.fontPointsize(65) >>> text = DrawableText(30, 250, "Hello pgmagick") >>> im.draw(text) >>> im.write('hoge.png') blob access:: >>> from pgmagick import Image, Blob, Geometry >>> blob = Blob(open('filename.jpg').read()) >>> blob.update(open('filename2.jpg').read()) >>> img = Image(blob, Geometry(600, 480)) >>> img.scale('300x200') >>> img.write('out.jpg') create animated-GIF:: from pgmagick import Image, ImageList, Geometry, Color imgs = ImageList() for color in ('red', 'blue', 'green', 'black', 'yellow'): imgs.append(Image(Geometry(200, 200), Color(color))) imgs.animationDelayImages(100) imgs.scaleImages(Geometry(100, 100)) imgs.writeImages('output.gif') more API detail... read to `Magick++ API for GraphicsMagick`_ document. .. _`Magick++ API for GraphicsMagick`: http://www.graphicsmagick.org/Magick++/ Python APIs(*NOTICE!! this api is alpha version!!*):: >>> from pgmagick.api import Image >>> img = Image((300, 300), "gradient:#ffffff-#000000") >>> img.scale(0.8) >>> img.write('out.png') Links ===== * PyPI_ * `Project Page`_ * `Project Page (Old)`_ * `CI(Jenkins)`_ .. _PyPI: http://pypi.python.org/pypi/pgmagick/ .. _`Project Page`: https://github.com/hhatto/pgmagick/ .. _`Project Page (Old)`: https://bitbucket.org/hhatto/pgmagick/ .. _`CI(Jenkins)`: http://jenkins.hexacosa.net/job/pgmagick/ pgmagick-0.6/setup.cfg0000644000076500000240000000007312620347020016000 0ustar hattori-hstaff00000000000000[egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 pgmagick-0.6/setup.py0000644000076500000240000001762712620346712015715 0ustar hattori-hstaff00000000000000from setuptools import setup, find_packages, Extension from distutils.sysconfig import get_python_inc import glob import os import re import sys import ast import io GMCPP_PC = 'GraphicsMagick++.pc' IMCPP_PC = 'ImageMagick++.pc' LIBRARY = 'GraphicsMagick' # default value include_dirs = [get_python_inc()] library_dirs = [] search_include_dirs = ['/usr/local/include/GraphicsMagick/', '/usr/include/GraphicsMagick/'] search_library_dirs = ['/usr/local/lib64/', '/usr/lib64/', '/usr/local/lib/', '/usr/lib/'] search_pkgconfig_dirs = ['/usr/local/lib/pkgconfig/', '/usr/local/lib64/pkgconfig/', '/usr/lib/pkgconfig/', '/usr/lib64/pkgconfig'] if sys.platform.lower() == 'darwin': if os.path.exists('/opt/local/include'): include_dirs.append('/opt/local/include/') else: include_dirs.append('/usr/local/include/') search_include_dirs.extend(['/opt/local/include/GraphicsMagick/', '/opt/local/include/', '/usr/local/Cellar/graphicsmagick']) search_library_dirs.extend(['/opt/local/lib/', '/usr/local/Cellar/graphicsmagick']) # for ImageMagick search_include_dirs.extend(['/usr/local/include/ImageMagick/', '/usr/include/ImageMagick/']) if sys.platform.lower() == 'darwin': search_include_dirs.append('/opt/local/include/ImageMagick/') def _grep(regex, filename): for line in open(filename): if re.search(regex, line): return line def get_version_from_devheaders(search_dirs): target_api_name = "addNoiseChannel" for dirname in search_dirs: for root, dirs, files in os.walk(dirname): for f in files: if f == 'Image.h': if _grep(target_api_name, os.path.join(root, 'Image.h')): return '1.2.0' def get_version_from_pc(search_dirs, target): """similar to 'pkg-config --modversion GraphicsMagick++'""" for dirname in search_dirs: for root, dirs, files in os.walk(dirname): for f in files: if f == target: _tmp = _grep("\Version: ", os.path.join(root, target)) return _tmp.split()[1] def find_file(filename, search_dirs): for dirname in search_dirs: for root, dirs, files in os.walk(dirname): for f in files: if filename in f: return root for d in dirs: if filename in d: return root if filename in root: return root return False # find to header path header_path = find_file('Magick++.h', search_include_dirs) if not header_path: raise Exception("Magick++ not found") print("include header path: %s" % header_path) include_dirs.append(header_path) # find to library path for boost_python # TODO: only test on Ubuntu11.10 _python_version = sys.version_info boost_lib_target_files = [] if _python_version >= (3, ): boost_lib_target_files.append("boost_python-py%s%s" % (_python_version[0], _python_version[1])) # ArchLinux uses boost_python3 boost_lib_target_files.append("boost_python3") boost_lib_target_files.append("boost_python-mt-py%s%s" % (_python_version[0], _python_version[1])) # gentoo appends the python version numbers to the boost_python libraries boost_lib_target_files.append("boost_python-%s.%s" % (_python_version[0], _python_version[1])) boost_lib_target_files.append("boost_python-mt") for boost_lib in boost_lib_target_files: lib_path = find_file('lib' + boost_lib, search_library_dirs) if lib_path: break if not lib_path: boost_lib = "boost_python" print("boost lib: %s" % boost_lib) libraries = [boost_lib] # find to library path for Magick lib_path = find_file('libGraphicsMagick++', search_library_dirs) if lib_path: libraries.append('GraphicsMagick++') print("library path: %s" % (os.path.join(lib_path, "libGraphicsMagick++"))) else: lib_path = find_file('libMagick++', search_library_dirs) if lib_path: LIBRARY = 'ImageMagick' libraries.append('Magick++') print("library path: %s" % (os.path.join(lib_path, "libMagick++"))) else: raise Exception("libGraphicsMagick++ (or libMagick++) not found") library_dirs.append(lib_path) # get version and extra compile argument ext_compile_args = [] if LIBRARY == 'GraphicsMagick': _version = get_version_from_pc(search_include_dirs + search_pkgconfig_dirs, GMCPP_PC) else: _version = get_version_from_pc(search_include_dirs + search_pkgconfig_dirs, IMCPP_PC) if not _version: _version = get_version_from_devheaders(include_dirs) if _version: _str_version = _version print("%s version: %s" % (LIBRARY, _version)) _version = list(map(int, _version.split('.'))) if len(_version) == 2: # ex) 1.2 -> 1.2.0 _version.append(0) if LIBRARY == 'GraphicsMagick': if _version[0] == 1 and _version[1] == 3 and _version[2] >= 22: ext_compile_args = ["-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_6", "-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_x", "-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_19", "-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_20", "-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_22"] elif _version[0] == 1 and _version[1] == 3 and _version[2] >= 20: ext_compile_args = ["-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_6", "-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_x", "-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_19", "-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_20"] elif _version[0] == 1 and _version[1] == 3 and _version[2] == 19: ext_compile_args = ["-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_6", "-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_x", "-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_19"] elif _version[0] == 1 and _version[1] == 3 and _version[2] >= 6: # for not Ubuntu10.04 ext_compile_args = ["-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_6", "-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_x"] elif not (_version[0] == 1 and _version[1] == 1): # for GM version 1.3.x and higher ext_compile_args = ["-DPGMAGICK_LIB_GRAPHICSMAGICK_1_3_x"] elif LIBRARY == 'ImageMagick': ext_compile_args = ["-DPGMAGICK_LIB_IMAGEMAGICK"] ext_compile_args.append("-D_LIBRARY_VERSION=\"%s\"" % (_str_version)) else: _version = '%s version: ???' % (LIBRARY) def version(): """Return version string.""" with io.open('pgmagick/_version.py') as input_file: for line in input_file: if line.startswith('__version__'): return ast.parse(line).body[0].value.s setup(name='pgmagick', version=version(), description="Yet Another Python wrapper for GraphicsMagick", long_description=open('README.rst').read(), author='Hideo Hattori', author_email='hhatto.jp@gmail.com', url='http://bitbucket.org/hhatto/pgmagick', license='MIT', packages=find_packages(), ext_modules=[ Extension('pgmagick._pgmagick', sources=glob.glob('./src/*.cpp'), include_dirs=include_dirs, library_dirs=library_dirs, libraries=libraries, extra_compile_args=ext_compile_args)], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: POSIX', 'Programming Language :: C++', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Topic :: Multimedia :: Graphics'], keywords="GraphicsMagick ImageMagick graphics boost image") pgmagick-0.6/src/0000755000076500000240000000000012620347020014746 5ustar hattori-hstaff00000000000000pgmagick-0.6/src/_Blob.cpp0000644000076500000240000000253212620311264016472 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; namespace { BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Blob_updateNoCopy_overloads_2_3, updateNoCopy, 2, 3) } static void update_wrapper(Magick::Blob& blob, const std::string& data) { blob.update(data.c_str(),data.size()); } static std::string get_blob_data(const Magick::Blob& blob) { const char* data = static_cast(blob.data()); size_t length = blob.length(); return std::string(data,data+length); } void __Blob() { scope* Magick_Blob_scope = new scope( class_< Magick::Blob >("Blob", init< >()) .def(init< const void*, size_t >()) .def(init< const Magick::Blob& >()) .def("base64", (void (Magick::Blob::*)(const std::string) )&Magick::Blob::base64) .def("base64", (std::string (Magick::Blob::*)() )&Magick::Blob::base64) .def("update", &update_wrapper) .def("updateNoCopy", &Magick::Blob::updateNoCopy, Magick_Blob_updateNoCopy_overloads_2_3()) .def("length", &Magick::Blob::length) ); enum_< Magick::Blob::Allocator >("Allocator") .value("NewAllocator", Magick::Blob::NewAllocator) .value("MallocAllocator", Magick::Blob::MallocAllocator) ; delete Magick_Blob_scope; def("get_blob_data", &get_blob_data); } pgmagick-0.6/src/_ChannelType.cpp0000644000076500000240000000172512620311264020031 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __ChannelType() { enum_< Magick::ChannelType >("ChannelType") .value("UndefinedChannel", Magick::UndefinedChannel) .value("RedChannel", Magick::RedChannel) .value("CyanChannel", Magick::CyanChannel) .value("GreenChannel", Magick::GreenChannel) .value("MagentaChannel", Magick::MagentaChannel) .value("BlueChannel", Magick::BlueChannel) .value("YellowChannel", Magick::YellowChannel) .value("OpacityChannel", Magick::OpacityChannel) .value("BlackChannel", Magick::BlackChannel) .value("MatteChannel", Magick::MatteChannel) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_x .value("AllChannels", Magick::AllChannels) .value("GrayChannel", Magick::GrayChannel) #endif #ifdef PGMAGICK_LIB_IMAGEMAGICK .value("AllChannels", Magick::AllChannels) #endif ; } pgmagick-0.6/src/_Color.cpp0000644000076500000240000001207512620311264016675 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __Color() { class_< Magick::Color >("Color", init< >()) .def(init< Magick::Quantum, Magick::Quantum, Magick::Quantum >()) .def(init< Magick::Quantum, Magick::Quantum, Magick::Quantum, Magick::Quantum >()) .def(init< const std::string& >()) .def(init< const char* >()) .def(init< const Magick::Color& >()) .def(init< const Magick::PixelPacket& >()) .def("redQuantum", (void (Magick::Color::*)(Magick::Quantum) )&Magick::Color::redQuantum) .def("redQuantum", (Magick::Quantum (Magick::Color::*)() const)&Magick::Color::redQuantum) .def("greenQuantum", (void (Magick::Color::*)(Magick::Quantum) )&Magick::Color::greenQuantum) .def("greenQuantum", (Magick::Quantum (Magick::Color::*)() const)&Magick::Color::greenQuantum) .def("blueQuantum", (void (Magick::Color::*)(Magick::Quantum) )&Magick::Color::blueQuantum) .def("blueQuantum", (Magick::Quantum (Magick::Color::*)() const)&Magick::Color::blueQuantum) .def("alphaQuantum", (void (Magick::Color::*)(Magick::Quantum) )&Magick::Color::alphaQuantum) .def("alphaQuantum", (Magick::Quantum (Magick::Color::*)() const)&Magick::Color::alphaQuantum) .def("alpha", (void (Magick::Color::*)(double) )&Magick::Color::alpha) .def("alpha", (double (Magick::Color::*)() const)&Magick::Color::alpha) .def("isValid", (void (Magick::Color::*)(bool) )&Magick::Color::isValid) .def("isValid", (bool (Magick::Color::*)() const)&Magick::Color::isValid) .def("intensity", &Magick::Color::intensity) .def("scaleDoubleToQuantum", &Magick::Color::scaleDoubleToQuantum) .def("scaleQuantumToDouble", (double (*)(const Magick::Quantum))&Magick::Color::scaleQuantumToDouble) .def("scaleQuantumToDouble", (double (*)(const double))&Magick::Color::scaleQuantumToDouble) .staticmethod("scaleDoubleToQuantum") .staticmethod("scaleQuantumToDouble") .def( self > self ) .def( self < self ) .def( self == self ) .def( self != self ) .def( self <= self ) .def( self >= self ) .def("to_std_string", &Magick::Color::operator std::string) .def("to_Magick_PixelPacket", &Magick::Color::operator Magick::PixelPacket) ; class_< Magick::ColorHSL, bases >("ColorHSL", init< >()) .def(init< double, double, double >()) .def(init< const Magick::Color& >()) .def("hue", (double (Magick::ColorHSL::*)() const)&Magick::ColorHSL::hue) .def("hue", (void (Magick::ColorHSL::*)(double) )&Magick::ColorHSL::hue) .def("saturation", (double (Magick::ColorHSL::*)() const)&Magick::ColorHSL::saturation) .def("saturation", (void (Magick::ColorHSL::*)(double) )&Magick::ColorHSL::saturation) .def("luminosity", (double (Magick::ColorHSL::*)() const)&Magick::ColorHSL::luminosity) .def("luminosity", (void (Magick::ColorHSL::*)(double) )&Magick::ColorHSL::luminosity) ; class_< Magick::ColorGray, bases >("ColorGray", init< >()) .def(init< double >()) .def(init< const Magick::Color& >()) .def("shade", (double (Magick::ColorGray::*)() const)&Magick::ColorGray::shade) .def("shade", (void (Magick::ColorGray::*)(double) )&Magick::ColorGray::shade) ; class_< Magick::ColorMono, bases >("ColorMono", init< >()) .def(init< bool >()) .def(init< const Magick::Color& >()) .def("mono", (void (Magick::ColorMono::*)(bool) )&Magick::ColorMono::mono) .def("mono", (bool (Magick::ColorMono::*)() const)&Magick::ColorMono::mono) ; class_< Magick::ColorRGB, bases >("ColorRGB", init< >()) .def(init< double, double, double >()) .def(init< const Magick::Color& >()) .def("red", (void (Magick::ColorRGB::*)(double) )&Magick::ColorRGB::red) .def("red", (double (Magick::ColorRGB::*)() const)&Magick::ColorRGB::red) .def("green", (void (Magick::ColorRGB::*)(double) )&Magick::ColorRGB::green) .def("green", (double (Magick::ColorRGB::*)() const)&Magick::ColorRGB::green) .def("blue", (void (Magick::ColorRGB::*)(double) )&Magick::ColorRGB::blue) .def("blue", (double (Magick::ColorRGB::*)() const)&Magick::ColorRGB::blue) ; class_< Magick::ColorYUV, bases >("ColorYUV", init< >()) .def(init< double, double, double >()) .def(init< const Magick::Color& >()) .def("u", (void (Magick::ColorYUV::*)(double) )&Magick::ColorYUV::u) .def("u", (double (Magick::ColorYUV::*)() const)&Magick::ColorYUV::u) .def("v", (void (Magick::ColorYUV::*)(double) )&Magick::ColorYUV::v) .def("v", (double (Magick::ColorYUV::*)() const)&Magick::ColorYUV::v) .def("y", (void (Magick::ColorYUV::*)(double) )&Magick::ColorYUV::y) .def("y", (double (Magick::ColorYUV::*)() const)&Magick::ColorYUV::y) ; implicitly_convertible(); } pgmagick-0.6/src/_ColorspaceType.cpp0000644000076500000240000000267012620311264020553 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __ColorspaceType() { enum_< Magick::ColorspaceType >("ColorspaceType") .value("UndefinedColorspace", Magick::UndefinedColorspace) .value("RGBColorspace", Magick::RGBColorspace) .value("GRAYColorspace", Magick::GRAYColorspace) .value("TransparentColorspace", Magick::TransparentColorspace) .value("OHTAColorspace", Magick::OHTAColorspace) .value("XYZColorspace", Magick::XYZColorspace) .value("YCbCrColorspace", Magick::YCbCrColorspace) .value("YCCColorspace", Magick::YCCColorspace) .value("YIQColorspace", Magick::YIQColorspace) .value("YPbPrColorspace", Magick::YPbPrColorspace) .value("YUVColorspace", Magick::YUVColorspace) .value("CMYKColorspace", Magick::CMYKColorspace) .value("sRGBColorspace", Magick::sRGBColorspace) .value("HSLColorspace", Magick::HSLColorspace) .value("HWBColorspace", Magick::HWBColorspace) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_x .value("LABColorspace", Magick::LABColorspace) .value("CineonLogRGBColorspace", Magick::CineonLogRGBColorspace) .value("Rec601LumaColorspace", Magick::Rec601LumaColorspace) .value("Rec709LumaColorspace", Magick::Rec709LumaColorspace) .value("Rec709YCbCrColorspace", Magick::Rec709YCbCrColorspace) #endif ; } pgmagick-0.6/src/_CompositeOperator.cpp0000644000076500000240000000512612620311264021274 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __CompositeOperator() { enum_< Magick::CompositeOperator >("CompositeOperator") .value("AddCompositeOp", Magick::AddCompositeOp) .value("AtopCompositeOp", Magick::AtopCompositeOp) .value("BumpmapCompositeOp", Magick::BumpmapCompositeOp) .value("ClearCompositeOp", Magick::ClearCompositeOp) .value("ColorizeCompositeOp", Magick::ColorizeCompositeOp) .value("CopyBlueCompositeOp", Magick::CopyBlueCompositeOp) .value("CopyCompositeOp", Magick::CopyCompositeOp) .value("CopyGreenCompositeOp", Magick::CopyGreenCompositeOp) .value("CopyOpacityCompositeOp", Magick::CopyOpacityCompositeOp) .value("CopyRedCompositeOp", Magick::CopyRedCompositeOp) .value("DarkenCompositeOp", Magick::DarkenCompositeOp) .value("DifferenceCompositeOp", Magick::DifferenceCompositeOp) .value("DisplaceCompositeOp", Magick::DisplaceCompositeOp) .value("DissolveCompositeOp", Magick::DissolveCompositeOp) .value("HueCompositeOp", Magick::HueCompositeOp) .value("InCompositeOp", Magick::InCompositeOp) .value("LightenCompositeOp", Magick::LightenCompositeOp) .value("LuminizeCompositeOp", Magick::LuminizeCompositeOp) .value("MinusCompositeOp", Magick::MinusCompositeOp) .value("ModulateCompositeOp", Magick::ModulateCompositeOp) .value("MultiplyCompositeOp", Magick::MultiplyCompositeOp) .value("NoCompositeOp", Magick::NoCompositeOp) .value("OutCompositeOp", Magick::OutCompositeOp) .value("OverCompositeOp", Magick::OverCompositeOp) .value("OverlayCompositeOp", Magick::OverlayCompositeOp) .value("PlusCompositeOp", Magick::PlusCompositeOp) .value("SaturateCompositeOp", Magick::SaturateCompositeOp) .value("ScreenCompositeOp", Magick::ScreenCompositeOp) .value("SubtractCompositeOp", Magick::SubtractCompositeOp) .value("ThresholdCompositeOp", Magick::ThresholdCompositeOp) .value("UndefinedCompositeOp", Magick::UndefinedCompositeOp) .value("XorCompositeOp", Magick::XorCompositeOp) .value("CopyCyanCompositeOp", Magick::CopyCyanCompositeOp) .value("CopyMagentaCompositeOp", Magick::CopyMagentaCompositeOp) .value("CopyYellowCompositeOp", Magick::CopyYellowCompositeOp) .value("CopyBlackCompositeOp", Magick::CopyBlackCompositeOp) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_x .value("DivideCompositeOp", Magick::DivideCompositeOp) #endif ; } pgmagick-0.6/src/_CompressionType.cpp0000644000076500000240000000135212620311264020756 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __CompressionType() { enum_< Magick::CompressionType >("CompressionType") .value("UndefinedCompression", Magick::UndefinedCompression) .value("NoCompression", Magick::NoCompression) .value("BZipCompression", Magick::BZipCompression) .value("FaxCompression", Magick::FaxCompression) .value("Group4Compression", Magick::Group4Compression) .value("JPEGCompression", Magick::JPEGCompression) .value("LZWCompression", Magick::LZWCompression) .value("RLECompression", Magick::RLECompression) .value("ZipCompression", Magick::ZipCompression) ; } pgmagick-0.6/src/_Coordinate.cpp0000644000076500000240000000140112620311264017675 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __Coordinate() { class_< Magick::Coordinate, boost::noncopyable >("Coordinate", init< >()) .def(init< double, double >()) .def("x", (void (Magick::Coordinate::*)(double) )&Magick::Coordinate::x) .def("x", (double (Magick::Coordinate::*)() const)&Magick::Coordinate::x) .def("y", (void (Magick::Coordinate::*)(double) )&Magick::Coordinate::y) .def("y", (double (Magick::Coordinate::*)() const)&Magick::Coordinate::y) .def( self >= self ) .def( self <= self ) .def( self > self ) .def( self < self ) .def( self == self ) .def( self != self ) ; } pgmagick-0.6/src/_DecorationType.cpp0000644000076500000240000000072212620311264020544 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __DecorationType() { enum_< Magick::DecorationType >("DecorationType") .value("NoDecoration", Magick::NoDecoration) .value("UnderlineDecoration", Magick::UnderlineDecoration) .value("OverlineDecoration", Magick::OverlineDecoration) .value("LineThroughDecoration", Magick::LineThroughDecoration) ; } pgmagick-0.6/src/_DistortImageMethod.cpp0000644000076500000240000000236512620311264021354 0ustar hattori-hstaff00000000000000#include #include using namespace boost::python; void __DistortImageMethod() { #ifdef PGMAGICK_LIB_IMAGEMAGICK enum_< Magick::DistortImageMethod >("DistortImageMethod") .value("UndefinedDistortion", Magick::UndefinedDistortion) .value("AffineDistortion", Magick::AffineDistortion) .value("AffineProjectionDistortion", Magick::AffineProjectionDistortion) .value("ScaleRotateTranslateDistortion", Magick::ScaleRotateTranslateDistortion) .value("PerspectiveDistortion", Magick::PerspectiveDistortion) .value("PerspectiveProjectionDistortion", Magick::PerspectiveProjectionDistortion) .value("BilinearDistortion", Magick::BilinearDistortion) .value("PolynomialDistortion", Magick::PolynomialDistortion) .value("ArcDistortion", Magick::ArcDistortion) .value("PolarDistortion", Magick::PolarDistortion) .value("DePolarDistortion", Magick::DePolarDistortion) .value("BarrelDistortion", Magick::BarrelDistortion) .value("BarrelInverseDistortion", Magick::BarrelInverseDistortion) .value("ShepardsDistortion", Magick::ShepardsDistortion) .value("SentinelDistortion", Magick::SentinelDistortion) ; #endif } pgmagick-0.6/src/_Drawable.cpp0000644000076500000240000001303512620311264017335 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost; using namespace boost::python; void __Drawable() { implicitly_convertible< Magick::DrawableBase, Magick::Drawable >(); class_< Magick::DrawableBase, noncopyable >("DrawableBase", no_init) ; class_< Magick::Drawable >("Drawable", init< >()) .def(init< const Magick::DrawableBase& >()) .def(init< const Magick::Drawable& >()) .def( self != self ) .def( self == self ) .def( self < self ) .def( self > self ) .def( self <= self ) .def( self >= self ) ; class_< Magick::DrawableList >("DrawableList", init< >()) .def(init< const Magick::DrawableList& >()) .def("push_back", static_cast::*)(const Magick::Drawable&)>(&std::list::push_back)) .def("append", static_cast::*)(const Magick::Drawable&)>(&std::list::push_back)) .def("pop_back", &std::list::pop_back) .def("pop", &std::list::pop_back) .def("remove", &std::list::remove) .def("reverse", &std::list::reverse) .def("count", &std::list::size) .def("__len__", &std::list::size) ; class_< Magick::CoordinateList >("CoordinateList", init< >()) .def(init< const Magick::CoordinateList& >()) .def("push_back", static_cast::*)(const Magick::Coordinate&)>(&std::list::push_back)) .def("append", static_cast::*)(const Magick::Coordinate&)>(&std::list::push_back)) .def("pop_back", &std::list::pop_back) .def("pop", &std::list::pop_back) .def("remove", &std::list::remove) .def("reverse", &std::list::reverse) .def("count", &std::list::size) .def("__len__", &std::list::size) ; class_< Magick::VPathList >("VPathList", init< >()) .def(init< const Magick::VPathList& >()) .def("push_back", static_cast::*)(const Magick::VPath&)>(&std::list::push_back)) .def("append", static_cast::*)(const Magick::VPath&)>(&std::list::push_back)) .def("pop_back", &std::list::pop_back) .def("pop", &std::list::pop_back) .def("remove", &std::list::remove) .def("reverse", &std::list::reverse) .def("count", &std::list::size) .def("__len__", &std::list::size) ; class_< Magick::PathArcArgsList >("PathArcArgsList", init< >()) .def(init< const Magick::PathArcArgsList& >()) .def("push_back", static_cast::*)(const Magick::PathArcArgs&)>(&std::list::push_back)) .def("append", static_cast::*)(const Magick::PathArcArgs&)>(&std::list::push_back)) .def("pop_back", &std::list::pop_back) .def("pop", &std::list::pop_back) .def("remove", &std::list::remove) .def("reverse", &std::list::reverse) .def("count", &std::list::size) .def("__len__", &std::list::size) ; class_< Magick::PathCurveToArgsList >("PathCurveToArgsList", init< >()) .def(init< const Magick::PathCurveToArgsList& >()) .def("push_back", static_cast::*)(const Magick::PathCurvetoArgs&)>(&std::list::push_back)) .def("append", static_cast::*)(const Magick::PathCurvetoArgs&)>(&std::list::push_back)) .def("pop_back", &std::list::pop_back) .def("pop", &std::list::pop_back) .def("remove", &std::list::remove) .def("reverse", &std::list::reverse) .def("count", &std::list::size) .def("__len__", &std::list::size) ; class_< Magick::PathQuadraticCurvetoArgsList >("PathQuadraticCurvetoArgsList", init< >()) .def(init< const Magick::PathQuadraticCurvetoArgsList& >()) .def("push_back", static_cast::*)(const Magick::PathQuadraticCurvetoArgs&)>(&std::list::push_back)) .def("append", static_cast::*)(const Magick::PathQuadraticCurvetoArgs&)>(&std::list::push_back)) .def("pop_back", &std::list::pop_back) .def("pop", &std::list::pop_back) .def("remove", &std::list::remove) .def("reverse", &std::list::reverse) .def("count", &std::list::size) .def("__len__", &std::list::size) ; } pgmagick-0.6/src/_DrawableAffine.cpp0000644000076500000240000000363612620311264020454 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableAffine_Wrapper: Magick::DrawableAffine { Magick_DrawableAffine_Wrapper(PyObject* py_self_, double p0, double p1, double p2, double p3, double p4, double p5): Magick::DrawableAffine(p0, p1, p2, p3, p4, p5), py_self(py_self_) {} Magick_DrawableAffine_Wrapper(PyObject* py_self_): Magick::DrawableAffine(), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableAffine() { class_< Magick::DrawableAffine, bases, boost::noncopyable, Magick_DrawableAffine_Wrapper >("DrawableAffine", init< >()) .def(init< double, double, double, double, double, double >()) .def("sx", (void (Magick::DrawableAffine::*)(const double) )&Magick::DrawableAffine::sx) .def("sx", (double (Magick::DrawableAffine::*)() const)&Magick::DrawableAffine::sx) .def("sy", (void (Magick::DrawableAffine::*)(const double) )&Magick::DrawableAffine::sy) .def("sy", (double (Magick::DrawableAffine::*)() const)&Magick::DrawableAffine::sy) .def("rx", (void (Magick::DrawableAffine::*)(const double) )&Magick::DrawableAffine::rx) .def("rx", (double (Magick::DrawableAffine::*)() const)&Magick::DrawableAffine::rx) .def("ry", (void (Magick::DrawableAffine::*)(const double) )&Magick::DrawableAffine::ry) .def("ry", (double (Magick::DrawableAffine::*)() const)&Magick::DrawableAffine::ry) .def("tx", (void (Magick::DrawableAffine::*)(const double) )&Magick::DrawableAffine::tx) .def("tx", (double (Magick::DrawableAffine::*)() const)&Magick::DrawableAffine::tx) .def("ty", (void (Magick::DrawableAffine::*)(const double) )&Magick::DrawableAffine::ty) .def("ty", (double (Magick::DrawableAffine::*)() const)&Magick::DrawableAffine::ty) ; } pgmagick-0.6/src/_DrawableArc.cpp0000644000076500000240000000341212620311264017761 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableArc_Wrapper: Magick::DrawableArc { Magick_DrawableArc_Wrapper(PyObject* py_self_, double p0, double p1, double p2, double p3, double p4, double p5): Magick::DrawableArc(p0, p1, p2, p3, p4, p5), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableArc() { class_< Magick::DrawableArc, bases, boost::noncopyable, Magick_DrawableArc_Wrapper >("DrawableArc", init< double, double, double, double, double, double >()) .def("startX", (void (Magick::DrawableArc::*)(double) )&Magick::DrawableArc::startX) .def("startX", (double (Magick::DrawableArc::*)() const)&Magick::DrawableArc::startX) .def("startY", (void (Magick::DrawableArc::*)(double) )&Magick::DrawableArc::startY) .def("startY", (double (Magick::DrawableArc::*)() const)&Magick::DrawableArc::startY) .def("endX", (void (Magick::DrawableArc::*)(double) )&Magick::DrawableArc::endX) .def("endX", (double (Magick::DrawableArc::*)() const)&Magick::DrawableArc::endX) .def("endY", (void (Magick::DrawableArc::*)(double) )&Magick::DrawableArc::endY) .def("endY", (double (Magick::DrawableArc::*)() const)&Magick::DrawableArc::endY) .def("startDegrees", (void (Magick::DrawableArc::*)(double) )&Magick::DrawableArc::startDegrees) .def("startDegrees", (double (Magick::DrawableArc::*)() const)&Magick::DrawableArc::startDegrees) .def("endDegrees", (void (Magick::DrawableArc::*)(double) )&Magick::DrawableArc::endDegrees) .def("endDegrees", (double (Magick::DrawableArc::*)() const)&Magick::DrawableArc::endDegrees) ; } pgmagick-0.6/src/_DrawableBezier.cpp0000644000076500000240000000143012620311264020472 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableBezier_Wrapper: Magick::DrawableBezier { Magick_DrawableBezier_Wrapper(PyObject* py_self_, const Magick::CoordinateList& p0): Magick::DrawableBezier(p0), py_self(py_self_) {} Magick_DrawableBezier_Wrapper(PyObject* py_self_, const Magick::DrawableBezier& p0): Magick::DrawableBezier(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableBezier() { class_< Magick::DrawableBezier, bases, Magick_DrawableBezier_Wrapper >("DrawableBezier", init< const Magick::CoordinateList& >()) .def(init< const Magick::DrawableBezier& >()) ; } pgmagick-0.6/src/_DrawableCircle.cpp0000644000076500000240000000263612620311264020464 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableCircle_Wrapper: Magick::DrawableCircle { Magick_DrawableCircle_Wrapper(PyObject* py_self_, double p0, double p1, double p2, double p3): Magick::DrawableCircle(p0, p1, p2, p3), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableCircle() { class_< Magick::DrawableCircle, bases, boost::noncopyable, Magick_DrawableCircle_Wrapper >("DrawableCircle", init< double, double, double, double >()) .def("originX", (void (Magick::DrawableCircle::*)(double) )&Magick::DrawableCircle::originX) .def("originX", (double (Magick::DrawableCircle::*)() const)&Magick::DrawableCircle::originX) .def("originY", (void (Magick::DrawableCircle::*)(double) )&Magick::DrawableCircle::originY) .def("originY", (double (Magick::DrawableCircle::*)() const)&Magick::DrawableCircle::originY) .def("perimX", (void (Magick::DrawableCircle::*)(double) )&Magick::DrawableCircle::perimX) .def("perimX", (double (Magick::DrawableCircle::*)() const)&Magick::DrawableCircle::perimX) .def("perimY", (void (Magick::DrawableCircle::*)(double) )&Magick::DrawableCircle::perimY) .def("perimY", (double (Magick::DrawableCircle::*)() const)&Magick::DrawableCircle::perimY) ; } pgmagick-0.6/src/_DrawableClipPath.cpp0000644000076500000240000000200612620311264020756 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableClipPath_Wrapper: Magick::DrawableClipPath { Magick_DrawableClipPath_Wrapper(PyObject* py_self_, const std::string& p0): Magick::DrawableClipPath(p0), py_self(py_self_) {} Magick_DrawableClipPath_Wrapper(PyObject* py_self_, const Magick::DrawableClipPath& p0): Magick::DrawableClipPath(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableClipPath() { class_< Magick::DrawableClipPath, bases, Magick_DrawableClipPath_Wrapper >("DrawableClipPath", init< const std::string& >()) .def(init< const Magick::DrawableClipPath& >()) .def("clip_path", (void (Magick::DrawableClipPath::*)(const std::string&) )&Magick::DrawableClipPath::clip_path) .def("clip_path", (std::string (Magick::DrawableClipPath::*)() const)&Magick::DrawableClipPath::clip_path) ; } pgmagick-0.6/src/_DrawableColor.cpp0000644000076500000240000000230412620311264020331 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableColor_Wrapper: Magick::DrawableColor { Magick_DrawableColor_Wrapper(PyObject* py_self_, double p0, double p1, Magick::PaintMethod p2): Magick::DrawableColor(p0, p1, p2), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableColor() { class_< Magick::DrawableColor, bases, boost::noncopyable, Magick_DrawableColor_Wrapper >("DrawableColor", init< double, double, Magick::PaintMethod >()) .def("x", (void (Magick::DrawableColor::*)(double) )&Magick::DrawableColor::x) .def("x", (double (Magick::DrawableColor::*)() const)&Magick::DrawableColor::x) .def("y", (void (Magick::DrawableColor::*)(double) )&Magick::DrawableColor::y) .def("y", (double (Magick::DrawableColor::*)() const)&Magick::DrawableColor::y) .def("paintMethod", (void (Magick::DrawableColor::*)(Magick::PaintMethod) )&Magick::DrawableColor::paintMethod) .def("paintMethod", (Magick::PaintMethod (Magick::DrawableColor::*)() const)&Magick::DrawableColor::paintMethod) ; } pgmagick-0.6/src/_DrawableCompositeImage.cpp0000644000076500000240000001037112620311264022163 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableCompositeImage_Wrapper: Magick::DrawableCompositeImage { Magick_DrawableCompositeImage_Wrapper(PyObject* py_self_, double p0, double p1, const std::string& p2): Magick::DrawableCompositeImage(p0, p1, p2), py_self(py_self_) {} Magick_DrawableCompositeImage_Wrapper(PyObject* py_self_, double p0, double p1, const Magick::Image& p2): Magick::DrawableCompositeImage(p0, p1, p2), py_self(py_self_) {} Magick_DrawableCompositeImage_Wrapper(PyObject* py_self_, double p0, double p1, double p2, double p3, const std::string& p4): Magick::DrawableCompositeImage(p0, p1, p2, p3, p4), py_self(py_self_) {} Magick_DrawableCompositeImage_Wrapper(PyObject* py_self_, double p0, double p1, double p2, double p3, const Magick::Image& p4): Magick::DrawableCompositeImage(p0, p1, p2, p3, p4), py_self(py_self_) {} Magick_DrawableCompositeImage_Wrapper(PyObject* py_self_, double p0, double p1, double p2, double p3, const std::string& p4, Magick::CompositeOperator p5): Magick::DrawableCompositeImage(p0, p1, p2, p3, p4, p5), py_self(py_self_) {} Magick_DrawableCompositeImage_Wrapper(PyObject* py_self_, double p0, double p1, double p2, double p3, const Magick::Image& p4, Magick::CompositeOperator p5): Magick::DrawableCompositeImage(p0, p1, p2, p3, p4, p5), py_self(py_self_) {} Magick_DrawableCompositeImage_Wrapper(PyObject* py_self_, const Magick::DrawableCompositeImage& p0): Magick::DrawableCompositeImage(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableCompositeImage() { class_< Magick::DrawableCompositeImage, bases, Magick_DrawableCompositeImage_Wrapper >("DrawableCompositeImage", init< const Magick::DrawableCompositeImage& >()) .def(init< double, double, const std::string& >()) .def(init< double, double, const Magick::Image& >()) .def(init< double, double, double, double, const std::string& >()) .def(init< double, double, double, double, const Magick::Image& >()) .def(init< double, double, double, double, const std::string&, Magick::CompositeOperator >()) .def(init< double, double, double, double, const Magick::Image&, Magick::CompositeOperator >()) .def("composition", (void (Magick::DrawableCompositeImage::*)(Magick::CompositeOperator) )&Magick::DrawableCompositeImage::composition) .def("composition", (Magick::CompositeOperator (Magick::DrawableCompositeImage::*)() const)&Magick::DrawableCompositeImage::composition) .def("filename", (void (Magick::DrawableCompositeImage::*)(const std::string&) )&Magick::DrawableCompositeImage::filename) .def("filename", (std::string (Magick::DrawableCompositeImage::*)() const)&Magick::DrawableCompositeImage::filename) .def("x", (void (Magick::DrawableCompositeImage::*)(double) )&Magick::DrawableCompositeImage::x) .def("x", (double (Magick::DrawableCompositeImage::*)() const)&Magick::DrawableCompositeImage::x) .def("y", (void (Magick::DrawableCompositeImage::*)(double) )&Magick::DrawableCompositeImage::y) .def("y", (double (Magick::DrawableCompositeImage::*)() const)&Magick::DrawableCompositeImage::y) .def("width", (void (Magick::DrawableCompositeImage::*)(double) )&Magick::DrawableCompositeImage::width) .def("width", (double (Magick::DrawableCompositeImage::*)() const)&Magick::DrawableCompositeImage::width) .def("height", (void (Magick::DrawableCompositeImage::*)(double) )&Magick::DrawableCompositeImage::height) .def("height", (double (Magick::DrawableCompositeImage::*)() const)&Magick::DrawableCompositeImage::height) .def("image", (void (Magick::DrawableCompositeImage::*)(const Magick::Image&) )&Magick::DrawableCompositeImage::image) .def("image", (Magick::Image (Magick::DrawableCompositeImage::*)() const)&Magick::DrawableCompositeImage::image) .def("magick", (void (Magick::DrawableCompositeImage::*)(std::string) )&Magick::DrawableCompositeImage::magick) .def("magick", (std::string (Magick::DrawableCompositeImage::*)() )&Magick::DrawableCompositeImage::magick) ; } pgmagick-0.6/src/_DrawableDashArray.cpp0000644000076500000240000000224312620311264021133 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableDashArray_Wrapper: Magick::DrawableDashArray { Magick_DrawableDashArray_Wrapper(PyObject* py_self_, const double* p0): Magick::DrawableDashArray(p0), py_self(py_self_) {} #ifdef PGMAGICK_LIB_IMAGEMAGICK Magick_DrawableDashArray_Wrapper(PyObject* py_self_, const size_t* p0): #else Magick_DrawableDashArray_Wrapper(PyObject* py_self_, const unsigned int* p0): #endif Magick::DrawableDashArray(p0), py_self(py_self_) {} Magick_DrawableDashArray_Wrapper(PyObject* py_self_, const Magick::DrawableDashArray& p0): Magick::DrawableDashArray(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableDashArray() { class_< Magick::DrawableDashArray, bases, Magick_DrawableDashArray_Wrapper >("DrawableDashArray", init< const double* >()) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def(init< const size_t* >()) #else .def(init< const unsigned int* >()) #endif .def(init< const Magick::DrawableDashArray& >()) ; } pgmagick-0.6/src/_DrawableDashOffset.cpp0000644000076500000240000000147612620311264021312 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableDashOffset_Wrapper: Magick::DrawableDashOffset { Magick_DrawableDashOffset_Wrapper(PyObject* py_self_, const double p0): Magick::DrawableDashOffset(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableDashOffset() { class_< Magick::DrawableDashOffset, bases, boost::noncopyable, Magick_DrawableDashOffset_Wrapper >("DrawableDashOffset", init< const double >()) .def("offset", (void (Magick::DrawableDashOffset::*)(const double) )&Magick::DrawableDashOffset::offset) .def("offset", (double (Magick::DrawableDashOffset::*)() const)&Magick::DrawableDashOffset::offset) ; } pgmagick-0.6/src/_DrawableEllipse.cpp0000644000076500000240000000361212620311264020653 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableEllipse_Wrapper: Magick::DrawableEllipse { Magick_DrawableEllipse_Wrapper(PyObject* py_self_, double p0, double p1, double p2, double p3, double p4, double p5): Magick::DrawableEllipse(p0, p1, p2, p3, p4, p5), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableEllipse() { class_< Magick::DrawableEllipse, bases, boost::noncopyable, Magick_DrawableEllipse_Wrapper >("DrawableEllipse", init< double, double, double, double, double, double >()) .def("originX", (void (Magick::DrawableEllipse::*)(double) )&Magick::DrawableEllipse::originX) .def("originX", (double (Magick::DrawableEllipse::*)() const)&Magick::DrawableEllipse::originX) .def("originY", (void (Magick::DrawableEllipse::*)(double) )&Magick::DrawableEllipse::originY) .def("originY", (double (Magick::DrawableEllipse::*)() const)&Magick::DrawableEllipse::originY) .def("radiusX", (void (Magick::DrawableEllipse::*)(double) )&Magick::DrawableEllipse::radiusX) .def("radiusX", (double (Magick::DrawableEllipse::*)() const)&Magick::DrawableEllipse::radiusX) .def("radiusY", (void (Magick::DrawableEllipse::*)(double) )&Magick::DrawableEllipse::radiusY) .def("radiusY", (double (Magick::DrawableEllipse::*)() const)&Magick::DrawableEllipse::radiusY) .def("arcStart", (void (Magick::DrawableEllipse::*)(double) )&Magick::DrawableEllipse::arcStart) .def("arcStart", (double (Magick::DrawableEllipse::*)() const)&Magick::DrawableEllipse::arcStart) .def("arcEnd", (void (Magick::DrawableEllipse::*)(double) )&Magick::DrawableEllipse::arcEnd) .def("arcEnd", (double (Magick::DrawableEllipse::*)() const)&Magick::DrawableEllipse::arcEnd) ; } pgmagick-0.6/src/_DrawableFillColor.cpp0000644000076500000240000000201612620311264021140 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableFillColor_Wrapper: Magick::DrawableFillColor { Magick_DrawableFillColor_Wrapper(PyObject* py_self_, const Magick::Color& p0): Magick::DrawableFillColor(p0), py_self(py_self_) {} Magick_DrawableFillColor_Wrapper(PyObject* py_self_, const Magick::DrawableFillColor& p0): Magick::DrawableFillColor(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableFillColor() { class_< Magick::DrawableFillColor, bases, Magick_DrawableFillColor_Wrapper >("DrawableFillColor", init< const Magick::Color& >()) .def(init< const Magick::DrawableFillColor& >()) .def("color", (void (Magick::DrawableFillColor::*)(const Magick::Color&) )&Magick::DrawableFillColor::color) .def("color", (Magick::Color (Magick::DrawableFillColor::*)() const)&Magick::DrawableFillColor::color) ; } pgmagick-0.6/src/_DrawableFillOpacity.cpp0000644000076500000240000000147412620311264021501 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableFillOpacity_Wrapper: Magick::DrawableFillOpacity { Magick_DrawableFillOpacity_Wrapper(PyObject* py_self_, double p0): Magick::DrawableFillOpacity(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableFillOpacity() { class_< Magick::DrawableFillOpacity, bases, boost::noncopyable, Magick_DrawableFillOpacity_Wrapper >("DrawableFillOpacity", init< double >()) .def("opacity", (void (Magick::DrawableFillOpacity::*)(double) )&Magick::DrawableFillOpacity::opacity) .def("opacity", (double (Magick::DrawableFillOpacity::*)() const)&Magick::DrawableFillOpacity::opacity) ; } pgmagick-0.6/src/_DrawableFillRule.cpp0000644000076500000240000000152612620311264020776 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableFillRule_Wrapper: Magick::DrawableFillRule { Magick_DrawableFillRule_Wrapper(PyObject* py_self_, const Magick::FillRule p0): Magick::DrawableFillRule(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableFillRule() { class_< Magick::DrawableFillRule, bases, boost::noncopyable, Magick_DrawableFillRule_Wrapper >("DrawableFillRule", init< const Magick::FillRule >()) .def("fillRule", (void (Magick::DrawableFillRule::*)(const Magick::FillRule) )&Magick::DrawableFillRule::fillRule) .def("fillRule", (Magick::FillRule (Magick::DrawableFillRule::*)() const)&Magick::DrawableFillRule::fillRule) ; } pgmagick-0.6/src/_DrawableFont.cpp0000644000076500000240000000237012620311264020164 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableFont_Wrapper: Magick::DrawableFont { Magick_DrawableFont_Wrapper(PyObject* py_self_, const std::string& p0): Magick::DrawableFont(p0), py_self(py_self_) {} Magick_DrawableFont_Wrapper(PyObject* py_self_, const std::string& p0, Magick::StyleType p1, const long unsigned int p2, Magick::StretchType p3): Magick::DrawableFont(p0, p1, p2, p3), py_self(py_self_) {} Magick_DrawableFont_Wrapper(PyObject* py_self_, const Magick::DrawableFont& p0): Magick::DrawableFont(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableFont() { class_< Magick::DrawableFont, bases, Magick_DrawableFont_Wrapper >("DrawableFont", init< const std::string& >()) .def(init< const std::string&, Magick::StyleType, const long unsigned int, Magick::StretchType >()) .def(init< const Magick::DrawableFont& >()) .def("font", (void (Magick::DrawableFont::*)(const std::string&) )&Magick::DrawableFont::font) .def("font", (std::string (Magick::DrawableFont::*)() const)&Magick::DrawableFont::font) ; } pgmagick-0.6/src/_DrawableGravity.cpp0000644000076500000240000000150012620311264020675 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableGravity_Wrapper: Magick::DrawableGravity { Magick_DrawableGravity_Wrapper(PyObject* py_self_, Magick::GravityType p0): Magick::DrawableGravity(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableGravity() { class_< Magick::DrawableGravity, bases, boost::noncopyable, Magick_DrawableGravity_Wrapper >("DrawableGravity", init< Magick::GravityType >()) .def("gravity", (void (Magick::DrawableGravity::*)(Magick::GravityType) )&Magick::DrawableGravity::gravity) .def("gravity", (Magick::GravityType (Magick::DrawableGravity::*)() const)&Magick::DrawableGravity::gravity) ; } pgmagick-0.6/src/_DrawableLine.cpp0000644000076500000240000000252612620311264020150 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableLine_Wrapper: Magick::DrawableLine { Magick_DrawableLine_Wrapper(PyObject* py_self_, double p0, double p1, double p2, double p3): Magick::DrawableLine(p0, p1, p2, p3), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableLine() { class_< Magick::DrawableLine, bases, boost::noncopyable, Magick_DrawableLine_Wrapper >("DrawableLine", init< double, double, double, double >()) .def("startX", (void (Magick::DrawableLine::*)(double) )&Magick::DrawableLine::startX) .def("startX", (double (Magick::DrawableLine::*)() const)&Magick::DrawableLine::startX) .def("startY", (void (Magick::DrawableLine::*)(double) )&Magick::DrawableLine::startY) .def("startY", (double (Magick::DrawableLine::*)() const)&Magick::DrawableLine::startY) .def("endX", (void (Magick::DrawableLine::*)(double) )&Magick::DrawableLine::endX) .def("endX", (double (Magick::DrawableLine::*)() const)&Magick::DrawableLine::endX) .def("endY", (void (Magick::DrawableLine::*)(double) )&Magick::DrawableLine::endY) .def("endY", (double (Magick::DrawableLine::*)() const)&Magick::DrawableLine::endY) ; } pgmagick-0.6/src/_DrawableMatte.cpp0000644000076500000240000000230412620311264020325 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableMatte_Wrapper: Magick::DrawableMatte { Magick_DrawableMatte_Wrapper(PyObject* py_self_, double p0, double p1, Magick::PaintMethod p2): Magick::DrawableMatte(p0, p1, p2), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableMatte() { class_< Magick::DrawableMatte, bases, boost::noncopyable, Magick_DrawableMatte_Wrapper >("DrawableMatte", init< double, double, Magick::PaintMethod >()) .def("x", (void (Magick::DrawableMatte::*)(double) )&Magick::DrawableMatte::x) .def("x", (double (Magick::DrawableMatte::*)() const)&Magick::DrawableMatte::x) .def("y", (void (Magick::DrawableMatte::*)(double) )&Magick::DrawableMatte::y) .def("y", (double (Magick::DrawableMatte::*)() const)&Magick::DrawableMatte::y) .def("paintMethod", (void (Magick::DrawableMatte::*)(Magick::PaintMethod) )&Magick::DrawableMatte::paintMethod) .def("paintMethod", (Magick::PaintMethod (Magick::DrawableMatte::*)() const)&Magick::DrawableMatte::paintMethod) ; } pgmagick-0.6/src/_DrawableMiterLimit.cpp0000644000076500000240000000260612620311264021337 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableMiterLimit_Wrapper: Magick::DrawableMiterLimit { #ifdef PGMAGICK_LIB_IMAGEMAGICK Magick_DrawableMiterLimit_Wrapper(PyObject* py_self_, size_t p0): #else Magick_DrawableMiterLimit_Wrapper(PyObject* py_self_, unsigned int p0): #endif Magick::DrawableMiterLimit(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableMiterLimit() { #ifdef PGMAGICK_LIB_IMAGEMAGICK class_< Magick::DrawableMiterLimit, bases, boost::noncopyable, Magick_DrawableMiterLimit_Wrapper >("DrawableMiterLimit", init< size_t >()) .def("miterlimit", (void (Magick::DrawableMiterLimit::*)(size_t) )&Magick::DrawableMiterLimit::miterlimit) .def("miterlimit", (size_t (Magick::DrawableMiterLimit::*)() const)&Magick::DrawableMiterLimit::miterlimit) ; #else class_< Magick::DrawableMiterLimit, bases, boost::noncopyable, Magick_DrawableMiterLimit_Wrapper >("DrawableMiterLimit", init< unsigned int >()) .def("miterlimit", (void (Magick::DrawableMiterLimit::*)(unsigned int) )&Magick::DrawableMiterLimit::miterlimit) .def("miterlimit", (unsigned int (Magick::DrawableMiterLimit::*)() const)&Magick::DrawableMiterLimit::miterlimit) ; #endif } pgmagick-0.6/src/_DrawablePath.cpp0000644000076500000240000000136612620311264020156 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawablePath_Wrapper: Magick::DrawablePath { Magick_DrawablePath_Wrapper(PyObject* py_self_, const Magick::VPathList& p0): Magick::DrawablePath(p0), py_self(py_self_) {} Magick_DrawablePath_Wrapper(PyObject* py_self_, const Magick::DrawablePath& p0): Magick::DrawablePath(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawablePath() { class_< Magick::DrawablePath, bases, Magick_DrawablePath_Wrapper >("DrawablePath", init< const Magick::VPathList& >()) .def(init< const Magick::DrawablePath& >()) ; } pgmagick-0.6/src/_DrawablePoint.cpp0000644000076500000240000000164212620311264020350 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawablePoint_Wrapper: Magick::DrawablePoint { Magick_DrawablePoint_Wrapper(PyObject* py_self_, double p0, double p1): Magick::DrawablePoint(p0, p1), py_self(py_self_) {} PyObject* py_self; }; } void __DrawablePoint() { class_< Magick::DrawablePoint, bases, boost::noncopyable, Magick_DrawablePoint_Wrapper >("DrawablePoint", init< double, double >()) .def("x", (void (Magick::DrawablePoint::*)(double) )&Magick::DrawablePoint::x) .def("x", (double (Magick::DrawablePoint::*)() const)&Magick::DrawablePoint::x) .def("y", (void (Magick::DrawablePoint::*)(double) )&Magick::DrawablePoint::y) .def("y", (double (Magick::DrawablePoint::*)() const)&Magick::DrawablePoint::y) ; } pgmagick-0.6/src/_DrawablePointSize.cpp0000644000076500000240000000145412620311264021204 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawablePointSize_Wrapper: Magick::DrawablePointSize { Magick_DrawablePointSize_Wrapper(PyObject* py_self_, double p0): Magick::DrawablePointSize(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawablePointSize() { class_< Magick::DrawablePointSize, bases, boost::noncopyable, Magick_DrawablePointSize_Wrapper >("DrawablePointSize", init< double >()) .def("pointSize", (void (Magick::DrawablePointSize::*)(double) )&Magick::DrawablePointSize::pointSize) .def("pointSize", (double (Magick::DrawablePointSize::*)() const)&Magick::DrawablePointSize::pointSize) ; } pgmagick-0.6/src/_DrawablePolygon.cpp0000644000076500000240000000144412620311264020706 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawablePolygon_Wrapper: Magick::DrawablePolygon { Magick_DrawablePolygon_Wrapper(PyObject* py_self_, const Magick::CoordinateList& p0): Magick::DrawablePolygon(p0), py_self(py_self_) {} Magick_DrawablePolygon_Wrapper(PyObject* py_self_, const Magick::DrawablePolygon& p0): Magick::DrawablePolygon(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawablePolygon() { class_< Magick::DrawablePolygon, bases, Magick_DrawablePolygon_Wrapper >("DrawablePolygon", init< const Magick::CoordinateList& >()) .def(init< const Magick::DrawablePolygon& >()) ; } pgmagick-0.6/src/_DrawablePolyline.cpp0000644000076500000240000000146012620311264021050 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawablePolyline_Wrapper: Magick::DrawablePolyline { Magick_DrawablePolyline_Wrapper(PyObject* py_self_, const Magick::CoordinateList& p0): Magick::DrawablePolyline(p0), py_self(py_self_) {} Magick_DrawablePolyline_Wrapper(PyObject* py_self_, const Magick::DrawablePolyline& p0): Magick::DrawablePolyline(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawablePolyline() { class_< Magick::DrawablePolyline, bases, Magick_DrawablePolyline_Wrapper >("DrawablePolyline", init< const Magick::CoordinateList& >()) .def(init< const Magick::DrawablePolyline& >()) ; } pgmagick-0.6/src/_DrawablePopClipPath.cpp0000644000076500000240000000111212620311264021432 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawablePopClipPath_Wrapper: Magick::DrawablePopClipPath { Magick_DrawablePopClipPath_Wrapper(PyObject* py_self_): Magick::DrawablePopClipPath(), py_self(py_self_) {} PyObject* py_self; }; } void __DrawablePopClipPath() { class_< Magick::DrawablePopClipPath, bases, boost::noncopyable, Magick_DrawablePopClipPath_Wrapper >("DrawablePopClipPath", init< >()) ; } pgmagick-0.6/src/_DrawablePopGraphicContext.cpp0000644000076500000240000000117212620311264022656 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawablePopGraphicContext_Wrapper: Magick::DrawablePopGraphicContext { Magick_DrawablePopGraphicContext_Wrapper(PyObject* py_self_): Magick::DrawablePopGraphicContext(), py_self(py_self_) {} PyObject* py_self; }; } void __DrawablePopGraphicContext() { class_< Magick::DrawablePopGraphicContext, bases, boost::noncopyable, Magick_DrawablePopGraphicContext_Wrapper >("DrawablePopGraphicContext", init< >()) ; } pgmagick-0.6/src/_DrawablePopPattern.cpp0000644000076500000240000000110212620311264021342 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawablePopPattern_Wrapper: Magick::DrawablePopPattern { Magick_DrawablePopPattern_Wrapper(PyObject* py_self_): Magick::DrawablePopPattern(), py_self(py_self_) {} PyObject* py_self; }; } void __DrawablePopPattern() { class_< Magick::DrawablePopPattern, bases, boost::noncopyable, Magick_DrawablePopPattern_Wrapper >("DrawablePopPattern", init< >()) ; } pgmagick-0.6/src/_DrawablePushClipPath.cpp0000644000076500000240000000151212620311264021617 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawablePushClipPath_Wrapper: Magick::DrawablePushClipPath { Magick_DrawablePushClipPath_Wrapper(PyObject* py_self_, const std::string& p0): Magick::DrawablePushClipPath(p0), py_self(py_self_) {} Magick_DrawablePushClipPath_Wrapper(PyObject* py_self_, const Magick::DrawablePushClipPath& p0): Magick::DrawablePushClipPath(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawablePushClipPath() { class_< Magick::DrawablePushClipPath, bases, Magick_DrawablePushClipPath_Wrapper >("DrawablePushClipPath", init< const std::string& >()) .def(init< const Magick::DrawablePushClipPath& >()) ; } pgmagick-0.6/src/_DrawablePushGraphicContext.cpp0000644000076500000240000000120212620311264023031 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawablePushGraphicContext_Wrapper: Magick::DrawablePushGraphicContext { Magick_DrawablePushGraphicContext_Wrapper(PyObject* py_self_): Magick::DrawablePushGraphicContext(), py_self(py_self_) {} PyObject* py_self; }; } void __DrawablePushGraphicContext() { class_< Magick::DrawablePushGraphicContext, bases, boost::noncopyable, Magick_DrawablePushGraphicContext_Wrapper >("DrawablePushGraphicContext", init< >()) ; } pgmagick-0.6/src/_DrawablePushPattern.cpp0000644000076500000240000000165212620311264021535 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawablePushPattern_Wrapper: Magick::DrawablePushPattern { Magick_DrawablePushPattern_Wrapper(PyObject* py_self_, const std::string& p0, long int p1, long int p2, long int p3, long int p4): Magick::DrawablePushPattern(p0, p1, p2, p3, p4), py_self(py_self_) {} Magick_DrawablePushPattern_Wrapper(PyObject* py_self_, const Magick::DrawablePushPattern& p0): Magick::DrawablePushPattern(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawablePushPattern() { class_< Magick::DrawablePushPattern, bases, Magick_DrawablePushPattern_Wrapper >("DrawablePushPattern", init< const Magick::DrawablePushPattern& >()) .def(init< const std::string&, long int, long int, long int, long int >()) ; } pgmagick-0.6/src/_DrawableRectangle.cpp0000644000076500000240000000304612620311264021163 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableRectangle_Wrapper: Magick::DrawableRectangle { Magick_DrawableRectangle_Wrapper(PyObject* py_self_, double p0, double p1, double p2, double p3): Magick::DrawableRectangle(p0, p1, p2, p3), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableRectangle() { class_< Magick::DrawableRectangle, bases, boost::noncopyable, Magick_DrawableRectangle_Wrapper >("DrawableRectangle", init< double, double, double, double >()) .def("upperLeftX", (void (Magick::DrawableRectangle::*)(double) )&Magick::DrawableRectangle::upperLeftX) .def("upperLeftX", (double (Magick::DrawableRectangle::*)() const)&Magick::DrawableRectangle::upperLeftX) .def("upperLeftY", (void (Magick::DrawableRectangle::*)(double) )&Magick::DrawableRectangle::upperLeftY) .def("upperLeftY", (double (Magick::DrawableRectangle::*)() const)&Magick::DrawableRectangle::upperLeftY) .def("lowerRightX", (void (Magick::DrawableRectangle::*)(double) )&Magick::DrawableRectangle::lowerRightX) .def("lowerRightX", (double (Magick::DrawableRectangle::*)() const)&Magick::DrawableRectangle::lowerRightX) .def("lowerRightY", (void (Magick::DrawableRectangle::*)(double) )&Magick::DrawableRectangle::lowerRightY) .def("lowerRightY", (double (Magick::DrawableRectangle::*)() const)&Magick::DrawableRectangle::lowerRightY) ; } pgmagick-0.6/src/_DrawableRotation.cpp0000644000076500000240000000142012620311264021050 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableRotation_Wrapper: Magick::DrawableRotation { Magick_DrawableRotation_Wrapper(PyObject* py_self_, double p0): Magick::DrawableRotation(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableRotation() { class_< Magick::DrawableRotation, bases, boost::noncopyable, Magick_DrawableRotation_Wrapper >("DrawableRotation", init< double >()) .def("angle", (void (Magick::DrawableRotation::*)(double) )&Magick::DrawableRotation::angle) .def("angle", (double (Magick::DrawableRotation::*)() const)&Magick::DrawableRotation::angle) ; } pgmagick-0.6/src/_DrawableRoundRectangle.cpp0000644000076500000240000000417612620311264022200 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableRoundRectangle_Wrapper: Magick::DrawableRoundRectangle { Magick_DrawableRoundRectangle_Wrapper(PyObject* py_self_, double p0, double p1, double p2, double p3, double p4, double p5): Magick::DrawableRoundRectangle(p0, p1, p2, p3, p4, p5), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableRoundRectangle() { class_< Magick::DrawableRoundRectangle, bases, boost::noncopyable, Magick_DrawableRoundRectangle_Wrapper >("DrawableRoundRectangle", init< double, double, double, double, double, double >()) .def("centerX", (void (Magick::DrawableRoundRectangle::*)(double) )&Magick::DrawableRoundRectangle::centerX) .def("centerX", (double (Magick::DrawableRoundRectangle::*)() const)&Magick::DrawableRoundRectangle::centerX) .def("centerY", (void (Magick::DrawableRoundRectangle::*)(double) )&Magick::DrawableRoundRectangle::centerY) .def("centerY", (double (Magick::DrawableRoundRectangle::*)() const)&Magick::DrawableRoundRectangle::centerY) .def("width", (void (Magick::DrawableRoundRectangle::*)(double) )&Magick::DrawableRoundRectangle::width) .def("width", (double (Magick::DrawableRoundRectangle::*)() const)&Magick::DrawableRoundRectangle::width) .def("hight", (void (Magick::DrawableRoundRectangle::*)(double) )&Magick::DrawableRoundRectangle::hight) .def("hight", (double (Magick::DrawableRoundRectangle::*)() const)&Magick::DrawableRoundRectangle::hight) .def("cornerWidth", (void (Magick::DrawableRoundRectangle::*)(double) )&Magick::DrawableRoundRectangle::cornerWidth) .def("cornerWidth", (double (Magick::DrawableRoundRectangle::*)() const)&Magick::DrawableRoundRectangle::cornerWidth) .def("cornerHeight", (void (Magick::DrawableRoundRectangle::*)(double) )&Magick::DrawableRoundRectangle::cornerHeight) .def("cornerHeight", (double (Magick::DrawableRoundRectangle::*)() const)&Magick::DrawableRoundRectangle::cornerHeight) ; } pgmagick-0.6/src/_DrawableScaling.cpp0000644000076500000240000000170212620311264020634 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableScaling_Wrapper: Magick::DrawableScaling { Magick_DrawableScaling_Wrapper(PyObject* py_self_, double p0, double p1): Magick::DrawableScaling(p0, p1), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableScaling() { class_< Magick::DrawableScaling, bases, boost::noncopyable, Magick_DrawableScaling_Wrapper >("DrawableScaling", init< double, double >()) .def("x", (void (Magick::DrawableScaling::*)(double) )&Magick::DrawableScaling::x) .def("x", (double (Magick::DrawableScaling::*)() const)&Magick::DrawableScaling::x) .def("y", (void (Magick::DrawableScaling::*)(double) )&Magick::DrawableScaling::y) .def("y", (double (Magick::DrawableScaling::*)() const)&Magick::DrawableScaling::y) ; } pgmagick-0.6/src/_DrawableSkewX.cpp0000644000076500000240000000135412620311264020320 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableSkewX_Wrapper: Magick::DrawableSkewX { Magick_DrawableSkewX_Wrapper(PyObject* py_self_, double p0): Magick::DrawableSkewX(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableSkewX() { class_< Magick::DrawableSkewX, bases, boost::noncopyable, Magick_DrawableSkewX_Wrapper >("DrawableSkewX", init< double >()) .def("angle", (void (Magick::DrawableSkewX::*)(double) )&Magick::DrawableSkewX::angle) .def("angle", (double (Magick::DrawableSkewX::*)() const)&Magick::DrawableSkewX::angle) ; } pgmagick-0.6/src/_DrawableSkewY.cpp0000644000076500000240000000135412620311264020321 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableSkewY_Wrapper: Magick::DrawableSkewY { Magick_DrawableSkewY_Wrapper(PyObject* py_self_, double p0): Magick::DrawableSkewY(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableSkewY() { class_< Magick::DrawableSkewY, bases, boost::noncopyable, Magick_DrawableSkewY_Wrapper >("DrawableSkewY", init< double >()) .def("angle", (void (Magick::DrawableSkewY::*)(double) )&Magick::DrawableSkewY::angle) .def("angle", (double (Magick::DrawableSkewY::*)() const)&Magick::DrawableSkewY::angle) ; } pgmagick-0.6/src/_DrawableStrokeAntialias.cpp0000644000076500000240000000153012620311264022350 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableStrokeAntialias_Wrapper: Magick::DrawableStrokeAntialias { Magick_DrawableStrokeAntialias_Wrapper(PyObject* py_self_, bool p0): Magick::DrawableStrokeAntialias(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableStrokeAntialias() { class_< Magick::DrawableStrokeAntialias, bases, boost::noncopyable, Magick_DrawableStrokeAntialias_Wrapper >("DrawableStrokeAntialias", init< bool >()) .def("flag", (void (Magick::DrawableStrokeAntialias::*)(bool) )&Magick::DrawableStrokeAntialias::flag) .def("flag", (bool (Magick::DrawableStrokeAntialias::*)() const)&Magick::DrawableStrokeAntialias::flag) ; } pgmagick-0.6/src/_DrawableStrokeColor.cpp0000644000076500000240000000205612620311264021525 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableStrokeColor_Wrapper: Magick::DrawableStrokeColor { Magick_DrawableStrokeColor_Wrapper(PyObject* py_self_, const Magick::Color& p0): Magick::DrawableStrokeColor(p0), py_self(py_self_) {} Magick_DrawableStrokeColor_Wrapper(PyObject* py_self_, const Magick::DrawableStrokeColor& p0): Magick::DrawableStrokeColor(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableStrokeColor() { class_< Magick::DrawableStrokeColor, bases, Magick_DrawableStrokeColor_Wrapper >("DrawableStrokeColor", init< const Magick::Color& >()) .def(init< const Magick::DrawableStrokeColor& >()) .def("color", (void (Magick::DrawableStrokeColor::*)(const Magick::Color&) )&Magick::DrawableStrokeColor::color) .def("color", (Magick::Color (Magick::DrawableStrokeColor::*)() const)&Magick::DrawableStrokeColor::color) ; } pgmagick-0.6/src/_DrawableStrokeLineCap.cpp0000644000076500000240000000157012620311264021762 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableStrokeLineCap_Wrapper: Magick::DrawableStrokeLineCap { Magick_DrawableStrokeLineCap_Wrapper(PyObject* py_self_, Magick::LineCap p0): Magick::DrawableStrokeLineCap(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableStrokeLineCap() { class_< Magick::DrawableStrokeLineCap, bases, boost::noncopyable, Magick_DrawableStrokeLineCap_Wrapper >("DrawableStrokeLineCap", init< Magick::LineCap >()) .def("linecap", (void (Magick::DrawableStrokeLineCap::*)(Magick::LineCap) )&Magick::DrawableStrokeLineCap::linecap) .def("linecap", (Magick::LineCap (Magick::DrawableStrokeLineCap::*)() const)&Magick::DrawableStrokeLineCap::linecap) ; } pgmagick-0.6/src/_DrawableStrokeLineJoin.cpp0000644000076500000240000000161412620311264022155 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableStrokeLineJoin_Wrapper: Magick::DrawableStrokeLineJoin { Magick_DrawableStrokeLineJoin_Wrapper(PyObject* py_self_, Magick::LineJoin p0): Magick::DrawableStrokeLineJoin(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableStrokeLineJoin() { class_< Magick::DrawableStrokeLineJoin, bases, boost::noncopyable, Magick_DrawableStrokeLineJoin_Wrapper >("DrawableStrokeLineJoin", init< Magick::LineJoin >()) .def("linejoin", (void (Magick::DrawableStrokeLineJoin::*)(Magick::LineJoin) )&Magick::DrawableStrokeLineJoin::linejoin) .def("linejoin", (Magick::LineJoin (Magick::DrawableStrokeLineJoin::*)() const)&Magick::DrawableStrokeLineJoin::linejoin) ; } pgmagick-0.6/src/_DrawableStrokeOpacity.cpp0000644000076500000240000000152412620311264022056 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableStrokeOpacity_Wrapper: Magick::DrawableStrokeOpacity { Magick_DrawableStrokeOpacity_Wrapper(PyObject* py_self_, double p0): Magick::DrawableStrokeOpacity(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableStrokeOpacity() { class_< Magick::DrawableStrokeOpacity, bases, boost::noncopyable, Magick_DrawableStrokeOpacity_Wrapper >("DrawableStrokeOpacity", init< double >()) .def("opacity", (void (Magick::DrawableStrokeOpacity::*)(double) )&Magick::DrawableStrokeOpacity::opacity) .def("opacity", (double (Magick::DrawableStrokeOpacity::*)() const)&Magick::DrawableStrokeOpacity::opacity) ; } pgmagick-0.6/src/_DrawableStrokeWidth.cpp0000644000076500000240000000146412620311264021530 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableStrokeWidth_Wrapper: Magick::DrawableStrokeWidth { Magick_DrawableStrokeWidth_Wrapper(PyObject* py_self_, double p0): Magick::DrawableStrokeWidth(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableStrokeWidth() { class_< Magick::DrawableStrokeWidth, bases, boost::noncopyable, Magick_DrawableStrokeWidth_Wrapper >("DrawableStrokeWidth", init< double >()) .def("width", (void (Magick::DrawableStrokeWidth::*)(double) )&Magick::DrawableStrokeWidth::width) .def("width", (double (Magick::DrawableStrokeWidth::*)() const)&Magick::DrawableStrokeWidth::width) ; } pgmagick-0.6/src/_DrawableText.cpp0000644000076500000240000000325412620311264020204 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableText_Wrapper: Magick::DrawableText { Magick_DrawableText_Wrapper(PyObject* py_self_, const double p0, const double p1, const std::string& p2): Magick::DrawableText(p0, p1, p2), py_self(py_self_) {} Magick_DrawableText_Wrapper(PyObject* py_self_, const double p0, const double p1, const std::string& p2, const std::string& p3): Magick::DrawableText(p0, p1, p2, p3), py_self(py_self_) {} Magick_DrawableText_Wrapper(PyObject* py_self_, const Magick::DrawableText& p0): Magick::DrawableText(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableText() { class_< Magick::DrawableText, bases, Magick_DrawableText_Wrapper >("DrawableText", init< const Magick::DrawableText& >()) .def(init< const double, const double, const std::string& >()) .def(init< const double, const double, const std::string&, const std::string& >()) .def("encoding", &Magick::DrawableText::encoding) .def("x", (void (Magick::DrawableText::*)(double) )&Magick::DrawableText::x) .def("x", (double (Magick::DrawableText::*)() const)&Magick::DrawableText::x) .def("y", (void (Magick::DrawableText::*)(double) )&Magick::DrawableText::y) .def("y", (double (Magick::DrawableText::*)() const)&Magick::DrawableText::y) .def("text", (void (Magick::DrawableText::*)(const std::string&) )&Magick::DrawableText::text) .def("text", (std::string (Magick::DrawableText::*)() const)&Magick::DrawableText::text) ; } pgmagick-0.6/src/_DrawableTextAntialias.cpp0000644000076500000240000000202112620311264022021 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableTextAntialias_Wrapper: Magick::DrawableTextAntialias { Magick_DrawableTextAntialias_Wrapper(PyObject* py_self_, bool p0): Magick::DrawableTextAntialias(p0), py_self(py_self_) {} Magick_DrawableTextAntialias_Wrapper(PyObject* py_self_, const Magick::DrawableTextAntialias& p0): Magick::DrawableTextAntialias(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableTextAntialias() { class_< Magick::DrawableTextAntialias, bases, Magick_DrawableTextAntialias_Wrapper >("DrawableTextAntialias", init< bool >()) .def(init< const Magick::DrawableTextAntialias& >()) .def("flag", (void (Magick::DrawableTextAntialias::*)(bool) )&Magick::DrawableTextAntialias::flag) .def("flag", (bool (Magick::DrawableTextAntialias::*)() const)&Magick::DrawableTextAntialias::flag) ; } pgmagick-0.6/src/_DrawableTextDecoration.cpp0000644000076500000240000000220112620311264022203 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableTextDecoration_Wrapper: Magick::DrawableTextDecoration { Magick_DrawableTextDecoration_Wrapper(PyObject* py_self_, Magick::DecorationType p0): Magick::DrawableTextDecoration(p0), py_self(py_self_) {} Magick_DrawableTextDecoration_Wrapper(PyObject* py_self_, const Magick::DrawableTextDecoration& p0): Magick::DrawableTextDecoration(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableTextDecoration() { class_< Magick::DrawableTextDecoration, bases, Magick_DrawableTextDecoration_Wrapper >("DrawableTextDecoration", init< Magick::DecorationType >()) .def(init< const Magick::DrawableTextDecoration& >()) .def("decoration", (void (Magick::DrawableTextDecoration::*)(Magick::DecorationType) )&Magick::DrawableTextDecoration::decoration) .def("decoration", (Magick::DecorationType (Magick::DrawableTextDecoration::*)() const)&Magick::DrawableTextDecoration::decoration) ; } pgmagick-0.6/src/_DrawableTextUnderColor.cpp0000644000076500000240000000213612620311264022177 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableTextUnderColor_Wrapper: Magick::DrawableTextUnderColor { Magick_DrawableTextUnderColor_Wrapper(PyObject* py_self_, const Magick::Color& p0): Magick::DrawableTextUnderColor(p0), py_self(py_self_) {} Magick_DrawableTextUnderColor_Wrapper(PyObject* py_self_, const Magick::DrawableTextUnderColor& p0): Magick::DrawableTextUnderColor(p0), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableTextUnderColor() { class_< Magick::DrawableTextUnderColor, bases, Magick_DrawableTextUnderColor_Wrapper >("DrawableTextUnderColor", init< const Magick::Color& >()) .def(init< const Magick::DrawableTextUnderColor& >()) .def("color", (void (Magick::DrawableTextUnderColor::*)(const Magick::Color&) )&Magick::DrawableTextUnderColor::color) .def("color", (Magick::Color (Magick::DrawableTextUnderColor::*)() const)&Magick::DrawableTextUnderColor::color) ; } pgmagick-0.6/src/_DrawableTranslation.cpp0000644000076500000240000000200212620311264021544 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableTranslation_Wrapper: Magick::DrawableTranslation { Magick_DrawableTranslation_Wrapper(PyObject* py_self_, double p0, double p1): Magick::DrawableTranslation(p0, p1), py_self(py_self_) {} PyObject* py_self; }; } void __DrawableTranslation() { class_< Magick::DrawableTranslation, bases, boost::noncopyable, Magick_DrawableTranslation_Wrapper >("DrawableTranslation", init< double, double >()) .def("x", (void (Magick::DrawableTranslation::*)(double) )&Magick::DrawableTranslation::x) .def("x", (double (Magick::DrawableTranslation::*)() const)&Magick::DrawableTranslation::x) .def("y", (void (Magick::DrawableTranslation::*)(double) )&Magick::DrawableTranslation::y) .def("y", (double (Magick::DrawableTranslation::*)() const)&Magick::DrawableTranslation::y) ; } pgmagick-0.6/src/_DrawableViewbox.cpp0000644000076500000240000000532112620311264020700 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_DrawableViewbox_Wrapper: Magick::DrawableViewbox { #ifdef PGMAGICK_LIB_IMAGEMAGICK Magick_DrawableViewbox_Wrapper(PyObject* py_self_, ::ssize_t p0, ::ssize_t p1, ::ssize_t p2, ::ssize_t p3): Magick::DrawableViewbox(p0, p1, p2, p3), py_self(py_self_) {} #else Magick_DrawableViewbox_Wrapper(PyObject* py_self_, long unsigned int p0, long unsigned int p1, long unsigned int p2, long unsigned int p3): Magick::DrawableViewbox(p0, p1, p2, p3), py_self(py_self_) {} #endif PyObject* py_self; }; } void __DrawableViewbox() { #ifdef PGMAGICK_LIB_IMAGEMAGICK class_< Magick::DrawableViewbox, bases, boost::noncopyable, Magick_DrawableViewbox_Wrapper >("DrawableViewbox", init< ::ssize_t, ::ssize_t, ::ssize_t, ::ssize_t >()) .def("x1", (void (Magick::DrawableViewbox::*)(::ssize_t) )&Magick::DrawableViewbox::x1) .def("x1", (::ssize_t (Magick::DrawableViewbox::*)() const)&Magick::DrawableViewbox::x1) .def("y1", (void (Magick::DrawableViewbox::*)(::ssize_t) )&Magick::DrawableViewbox::y1) .def("y1", (::ssize_t (Magick::DrawableViewbox::*)() const)&Magick::DrawableViewbox::y1) .def("x2", (void (Magick::DrawableViewbox::*)(::ssize_t) )&Magick::DrawableViewbox::x2) .def("x2", (::ssize_t (Magick::DrawableViewbox::*)() const)&Magick::DrawableViewbox::x2) .def("y2", (void (Magick::DrawableViewbox::*)(::ssize_t) )&Magick::DrawableViewbox::y2) .def("y2", (::ssize_t (Magick::DrawableViewbox::*)() const)&Magick::DrawableViewbox::y2) #else class_< Magick::DrawableViewbox, bases, boost::noncopyable, Magick_DrawableViewbox_Wrapper >("DrawableViewbox", init< long unsigned int, long unsigned int, long unsigned int, long unsigned int >()) .def("x1", (void (Magick::DrawableViewbox::*)(unsigned long) )&Magick::DrawableViewbox::x1) .def("x1", (unsigned long (Magick::DrawableViewbox::*)() const)&Magick::DrawableViewbox::x1) .def("y1", (void (Magick::DrawableViewbox::*)(unsigned long) )&Magick::DrawableViewbox::y1) .def("y1", (unsigned long (Magick::DrawableViewbox::*)() const)&Magick::DrawableViewbox::y1) .def("x2", (void (Magick::DrawableViewbox::*)(unsigned long) )&Magick::DrawableViewbox::x2) .def("x2", (unsigned long (Magick::DrawableViewbox::*)() const)&Magick::DrawableViewbox::x2) .def("y2", (void (Magick::DrawableViewbox::*)(unsigned long) )&Magick::DrawableViewbox::y2) .def("y2", (unsigned long (Magick::DrawableViewbox::*)() const)&Magick::DrawableViewbox::y2) #endif ; } pgmagick-0.6/src/_EndianType.cpp0000644000076500000240000000053712620311264017657 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __EndianType() { enum_< Magick::EndianType >("EndianType") .value("UndefinedEndian", Magick::UndefinedEndian) .value("LSBEndian", Magick::LSBEndian) .value("MSBEndian", Magick::MSBEndian) ; } pgmagick-0.6/src/_Exception.cpp0000644000076500000240000000202312620311264017545 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; namespace { struct Magick_Exception_Wrapper: Magick::Exception { Magick_Exception_Wrapper(PyObject* py_self_, const std::string& p0): Magick::Exception(p0), py_self(py_self_) {} Magick_Exception_Wrapper(PyObject* py_self_, const Magick::Exception& p0): Magick::Exception(p0), py_self(py_self_) {} const char* what() const throw() { return call_method< const char* >(py_self, "what"); } const char* default_what() const { return Magick::Exception::what(); } PyObject* py_self; }; } void __Exception() { class_< Magick::Exception, Magick_Exception_Wrapper >("Exception", init< const std::string& >()) .def(init< const Magick::Exception& >()) .def("what", (const char* (Magick::Exception::*)() const throw())&Magick::Exception::what, (const char* (Magick_Exception_Wrapper::*)() const)&Magick_Exception_Wrapper::default_what) ; } pgmagick-0.6/src/_FillRule.cpp0000644000076500000240000000053512620311264017333 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __FillRule() { enum_< Magick::FillRule >("FillRule") .value("UndefinedRule", Magick::UndefinedRule) .value("EvenOddRule", Magick::EvenOddRule) .value("NonZeroRule", Magick::NonZeroRule) ; } pgmagick-0.6/src/_FilterTypes.cpp0000644000076500000240000000205712620311264020070 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __FilterTypes() { enum_< Magick::FilterTypes >("FilterTypes") .value("UndefinedFilter", Magick::UndefinedFilter) .value("PointFilter", Magick::PointFilter) .value("BoxFilter", Magick::BoxFilter) .value("TriangleFilter", Magick::TriangleFilter) .value("HermiteFilter", Magick::HermiteFilter) .value("HanningFilter", Magick::HanningFilter) .value("HammingFilter", Magick::HammingFilter) .value("BlackmanFilter", Magick::BlackmanFilter) .value("GaussianFilter", Magick::GaussianFilter) .value("QuadraticFilter", Magick::QuadraticFilter) .value("CubicFilter", Magick::CubicFilter) .value("CatromFilter", Magick::CatromFilter) .value("MitchellFilter", Magick::MitchellFilter) .value("LanczosFilter", Magick::LanczosFilter) .value("BesselFilter", Magick::BesselFilter) .value("SincFilter", Magick::SincFilter) ; } pgmagick-0.6/src/_Geometry.cpp0000644000076500000240000000654412620311264017416 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __Geometry() { class_< Magick::Geometry >("Geometry", init< >()) .def(init< unsigned int, unsigned int, optional< unsigned int, unsigned int, bool, bool > >()) .def(init< const std::string& >()) .def(init< const char* >()) .def(init< const Magick::Geometry& >()) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("width", (void (Magick::Geometry::*)(size_t) )&Magick::Geometry::width) .def("width", (size_t (Magick::Geometry::*)() const)&Magick::Geometry::width) .def("height", (void (Magick::Geometry::*)(size_t) )&Magick::Geometry::height) .def("height", (size_t (Magick::Geometry::*)() const)&Magick::Geometry::height) .def("xOff", (void (Magick::Geometry::*)(::ssize_t) )&Magick::Geometry::xOff) .def("xOff", (::ssize_t (Magick::Geometry::*)() const)&Magick::Geometry::xOff) .def("yOff", (void (Magick::Geometry::*)(::ssize_t) )&Magick::Geometry::yOff) .def("yOff", (::ssize_t (Magick::Geometry::*)() const)&Magick::Geometry::yOff) #else .def("width", (void (Magick::Geometry::*)(unsigned int) )&Magick::Geometry::width) .def("width", (unsigned int (Magick::Geometry::*)() const)&Magick::Geometry::width) .def("height", (void (Magick::Geometry::*)(unsigned int) )&Magick::Geometry::height) .def("height", (unsigned int (Magick::Geometry::*)() const)&Magick::Geometry::height) .def("xOff", (void (Magick::Geometry::*)(unsigned int) )&Magick::Geometry::xOff) .def("xOff", (unsigned int (Magick::Geometry::*)() const)&Magick::Geometry::xOff) .def("yOff", (void (Magick::Geometry::*)(unsigned int) )&Magick::Geometry::yOff) .def("yOff", (unsigned int (Magick::Geometry::*)() const)&Magick::Geometry::yOff) #endif .def("xNegative", (void (Magick::Geometry::*)(bool) )&Magick::Geometry::xNegative) .def("xNegative", (bool (Magick::Geometry::*)() const)&Magick::Geometry::xNegative) .def("yNegative", (void (Magick::Geometry::*)(bool) )&Magick::Geometry::yNegative) .def("yNegative", (bool (Magick::Geometry::*)() const)&Magick::Geometry::yNegative) .def("percent", (void (Magick::Geometry::*)(bool) )&Magick::Geometry::percent) .def("percent", (bool (Magick::Geometry::*)() const)&Magick::Geometry::percent) .def("aspect", (void (Magick::Geometry::*)(bool) )&Magick::Geometry::aspect) .def("aspect", (bool (Magick::Geometry::*)() const)&Magick::Geometry::aspect) .def("greater", (void (Magick::Geometry::*)(bool) )&Magick::Geometry::greater) .def("greater", (bool (Magick::Geometry::*)() const)&Magick::Geometry::greater) .def("less", (void (Magick::Geometry::*)(bool) )&Magick::Geometry::less) .def("less", (bool (Magick::Geometry::*)() const)&Magick::Geometry::less) .def("isValid", (void (Magick::Geometry::*)(bool) )&Magick::Geometry::isValid) .def("isValid", (bool (Magick::Geometry::*)() const)&Magick::Geometry::isValid) .def( self <= self ) .def( self == self ) .def( self > self ) .def( self != self ) .def( self < self ) .def( self >= self ) .def("to_std_string", &Magick::Geometry::operator std::string) ; implicitly_convertible(); } pgmagick-0.6/src/_gminfo.cpp0000644000076500000240000000075612620346712017107 0ustar hattori-hstaff00000000000000#include using namespace boost::python; #define _LIB_NAME "GraphicsMagick" #ifndef _LIBRARY_VERSION #define _LIBRARY_VERSION "0.0.0" #ifdef PGMAGICK_LIB_IMAGEMAGICK #undef _LIB_NAME #define _LIB_NAME "ImageMagick" #endif #endif const char* get_version(void) { return _LIBRARY_VERSION; } const char* get_library(void) { return _LIB_NAME; } void __gminfo() { def("get_version", get_version); def("get_library", get_library); } pgmagick-0.6/src/_GravityType.cpp0000644000076500000240000000146212620311264020104 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __GravityType() { enum_< Magick::GravityType >("GravityType") .value("ForgetGravity", Magick::ForgetGravity) .value("NorthWestGravity", Magick::NorthWestGravity) .value("NorthGravity", Magick::NorthGravity) .value("NorthEastGravity", Magick::NorthEastGravity) .value("WestGravity", Magick::WestGravity) .value("CenterGravity", Magick::CenterGravity) .value("EastGravity", Magick::EastGravity) .value("SouthWestGravity", Magick::SouthWestGravity) .value("SouthGravity", Magick::SouthGravity) .value("SouthEastGravity", Magick::SouthEastGravity) .value("StaticGravity", Magick::StaticGravity) ; } pgmagick-0.6/src/_Image.cpp0000644000076500000240000012034012620311264016634 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; namespace { BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_adaptiveBlur_overloads_0_2, adaptiveBlur, 0, 2) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_adaptiveThreshold_overloads_2_3, adaptiveThreshold, 2, 3) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_blur_overloads_0_2, blur, 0, 2) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_blurChannel_overloads_1_3, blurChannel, 1, 3) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_border_overloads_0_1, border, 0, 1) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_charcoal_overloads_0_2, charcoal, 0, 2) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_composite_overloads_3_4, composite, 3, 4) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_composite_overloads_2_3, composite, 2, 3) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_distort_overloads_3_4, distort, 3, 4) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_edge_overloads_0_1, edge, 0, 1) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_emboss_overloads_0_2, emboss, 0, 2) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_frame_overloads_0_1, frame, 0, 1) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_frame_overloads_2_4, frame, 2, 4) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_map_overloads_1_2, map, 1, 2) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_medianFilter_overloads_0_1, medianFilter, 0, 1) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_negate_overloads_0_1, negate, 0, 1) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_oilPaint_overloads_0_1, oilPaint, 0, 1) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_quantize_overloads_0_1, quantize, 0, 1) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_raise_overloads_0_2, raise, 0, 2) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_segment_overloads_0_2, segment, 0, 2) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_shade_overloads_0_3, shade, 0, 3) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_sharpen_overloads_0_2, sharpen, 0, 2) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_sharpenChannel_overloads_1_3, sharpenChannel, 1, 3) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_sigmoidalContrast_overloads_2_3, sigmoidalContrast, 2, 3) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_solarize_overloads_0_1, solarize, 0, 1) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_spread_overloads_0_1, spread, 0, 1) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_wave_overloads_0_2, wave, 0, 2) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_Image_signature_overloads_0_1, signature, 0, 1) } void __Image() { def("InitializeMagick", Magick::InitializeMagick); class_< Magick::Image >("Image", init< >()) .def(init< const std::string& >()) .def(init< const Magick::Geometry&, const Magick::Color& >()) .def(init< const Magick::Blob& >()) .def(init< const Magick::Blob&, const Magick::Geometry& >()) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def(init< const Magick::Blob&, const Magick::Geometry&, const size_t >()) .def(init< const Magick::Blob&, const Magick::Geometry&, const size_t, const std::string& >()) #else .def(init< const Magick::Blob&, const Magick::Geometry&, const unsigned int >()) .def(init< const Magick::Blob&, const Magick::Geometry&, const unsigned int, const std::string& >()) #endif .def(init< const Magick::Blob&, const Magick::Geometry&, const std::string& >()) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def(init< const size_t, const size_t, const std::string&, const Magick::StorageType, const char* >()) #else .def(init< const unsigned int, const unsigned int, const std::string&, const Magick::StorageType, const char* >()) #endif .def(init< const Magick::Image& >()) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("adaptiveBlur", &Magick::Image::adaptiveBlur, Magick_Image_adaptiveBlur_overloads_0_2()) #endif #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_22 .def("adaptiveThreshold", (void (Magick::Image::*)(const unsigned int, const unsigned int, const double) )&Magick::Image::adaptiveThreshold) #else .def("adaptiveThreshold", &Magick::Image::adaptiveThreshold, Magick_Image_adaptiveThreshold_overloads_2_3()) #endif .def("addNoise", &Magick::Image::addNoise) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_x .def("addNoiseChannel", &Magick::Image::addNoiseChannel) #endif .def("affineTransform", &Magick::Image::affineTransform) .def("annotate", (void (Magick::Image::*)(const std::string&, const Magick::Geometry&) )&Magick::Image::annotate) .def("annotate", (void (Magick::Image::*)(const std::string&, const Magick::Geometry&, const Magick::GravityType) )&Magick::Image::annotate) .def("annotate", (void (Magick::Image::*)(const std::string&, const Magick::Geometry&, const Magick::GravityType, const double) )&Magick::Image::annotate) .def("annotate", (void (Magick::Image::*)(const std::string&, const Magick::GravityType) )&Magick::Image::annotate) .def("blur", &Magick::Image::blur, Magick_Image_blur_overloads_0_2()) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_x .def("blurChannel", &Magick::Image::blurChannel, Magick_Image_blurChannel_overloads_1_3()) #endif .def("border", &Magick::Image::border, Magick_Image_border_overloads_0_1()) .def("channel", &Magick::Image::channel) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("channelDepth", (void (Magick::Image::*)(const Magick::ChannelType, const size_t) )&Magick::Image::channelDepth) .def("channelDepth", (size_t (Magick::Image::*)(const Magick::ChannelType) )&Magick::Image::channelDepth) #else .def("channelDepth", (void (Magick::Image::*)(const Magick::ChannelType, const unsigned int) )&Magick::Image::channelDepth) .def("channelDepth", (unsigned int (Magick::Image::*)(const Magick::ChannelType) )&Magick::Image::channelDepth) #endif .def("charcoal", &Magick::Image::charcoal, Magick_Image_charcoal_overloads_0_2()) .def("chop", &Magick::Image::chop) .def("colorize", (void (Magick::Image::*)(const unsigned int, const unsigned int, const unsigned int, const Magick::Color&) )&Magick::Image::colorize) .def("colorize", (void (Magick::Image::*)(const unsigned int, const Magick::Color&) )&Magick::Image::colorize) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_6 .def("colorMatrix", (void (Magick::Image::*)(const unsigned int, const double*) )&Magick::Image::colorMatrix) #endif .def("comment", (void (Magick::Image::*)(const std::string&) )&Magick::Image::comment) .def("compare", &Magick::Image::compare) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("composite", (void (Magick::Image::*)(const Magick::Image&, const ::ssize_t, const ::ssize_t, const Magick::CompositeOperator))&Magick::Image::composite, Magick_Image_composite_overloads_3_4()) #else .def("composite", (void (Magick::Image::*)(const Magick::Image&, const int, const int, const Magick::CompositeOperator))&Magick::Image::composite, Magick_Image_composite_overloads_3_4()) #endif .def("composite", (void (Magick::Image::*)(const Magick::Image&, const Magick::Geometry&, Magick::CompositeOperator))&Magick::Image::composite, Magick_Image_composite_overloads_2_3()) .def("composite", (void (Magick::Image::*)(const Magick::Image&, const Magick::GravityType, Magick::CompositeOperator))&Magick::Image::composite, Magick_Image_composite_overloads_2_3()) .def("contrast", &Magick::Image::contrast) .def("convolve", &Magick::Image::convolve) .def("crop", &Magick::Image::crop) .def("cycleColormap", &Magick::Image::cycleColormap) .def("despeckle", &Magick::Image::despeckle) .def("display", &Magick::Image::display) #ifdef PGMAGICK_LIB_IMAGEMAGICK // FIXME: not worked .def("distort", (void (Magick::Image::*)(const Magick::DistortImageMethod, const size_t, const double*, const bool))&Magick::Image::distort) #endif .def("draw", (void (Magick::Image::*)(const Magick::Drawable&) )&Magick::Image::draw) .def("draw", (void (Magick::Image::*)(const std::list >&) )&Magick::Image::draw) .def("edge", &Magick::Image::edge, Magick_Image_edge_overloads_0_1()) .def("emboss", &Magick::Image::emboss, Magick_Image_emboss_overloads_0_2()) .def("enhance", &Magick::Image::enhance) .def("equalize", &Magick::Image::equalize) .def("erase", &Magick::Image::erase) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("extent", (void (Magick::Image::*)(const Magick::Geometry&))&Magick::Image::extent) .def("extent", (void (Magick::Image::*)(const Magick::Geometry&, const Magick::Color&))&Magick::Image::extent) .def("extent", (void (Magick::Image::*)(const Magick::Geometry&, const Magick::GravityType))&Magick::Image::extent) .def("extent", (void (Magick::Image::*)(const Magick::Geometry&, const Magick::Color&, const Magick::GravityType))&Magick::Image::extent) #endif .def("flip", &Magick::Image::flip) .def("floodFillColor", (void (Magick::Image::*)(const Magick::Geometry&, const Magick::Color&) )&Magick::Image::floodFillColor) .def("floodFillColor", (void (Magick::Image::*)(const Magick::Geometry&, const Magick::Color&, const Magick::Color&) )&Magick::Image::floodFillColor) .def("floodFillOpacity", &Magick::Image::floodFillOpacity) .def("floodFillTexture", (void (Magick::Image::*)(const Magick::Geometry&, const Magick::Image&) )&Magick::Image::floodFillTexture) .def("floodFillTexture", (void (Magick::Image::*)(const Magick::Geometry&, const Magick::Image&, const Magick::Color&) )&Magick::Image::floodFillTexture) .def("flop", &Magick::Image::flop) .def("frame", (void (Magick::Image::*)(const Magick::Geometry&) )&Magick::Image::frame, Magick_Image_frame_overloads_0_1()) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("frame", (void (Magick::Image::*)(const size_t, const size_t, const ::ssize_t, const ::ssize_t) )&Magick::Image::frame, Magick_Image_frame_overloads_2_4()) #else .def("frame", (void (Magick::Image::*)(const unsigned int, const unsigned int, const int, const int) )&Magick::Image::frame, Magick_Image_frame_overloads_2_4()) #endif .def("gamma", (void (Magick::Image::*)(const double) )&Magick::Image::gamma) .def("gamma", (void (Magick::Image::*)(const double, const double, const double) )&Magick::Image::gamma) .def("gaussianBlur", &Magick::Image::gaussianBlur) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_x .def("gaussianBlurChannel", &Magick::Image::gaussianBlurChannel) #endif #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_6 .def("haldClut", &Magick::Image::haldClut) #endif #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("haldClut", &Magick::Image::haldClut) #endif .def("implode", &Magick::Image::implode) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("inverseFourierTransform", (void (Magick::Image::*)(const Magick::Image&))&Magick::Image::inverseFourierTransform) .def("inverseFourierTransform", (void (Magick::Image::*)(const Magick::Image&, const bool))&Magick::Image::inverseFourierTransform) #endif .def("label", (void (Magick::Image::*)(const std::string&) )&Magick::Image::label) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_x .def("level", &Magick::Image::level) .def("levelChannel", &Magick::Image::levelChannel) #endif .def("magnify", &Magick::Image::magnify) .def("map", &Magick::Image::map, Magick_Image_map_overloads_1_2()) .def("matteFloodfill", &Magick::Image::matteFloodfill) .def("medianFilter", &Magick::Image::medianFilter, Magick_Image_medianFilter_overloads_0_1()) .def("minify", &Magick::Image::minify) .def("modulate", &Magick::Image::modulate) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_x .def("motionBlur", &Magick::Image::motionBlur) #endif .def("negate", &Magick::Image::negate, Magick_Image_negate_overloads_0_1()) .def("normalize", &Magick::Image::normalize) .def("oilPaint", &Magick::Image::oilPaint, Magick_Image_oilPaint_overloads_0_1()) .def("opacity", &Magick::Image::opacity) .def("opaque", &Magick::Image::opaque) .def("ping", (void (Magick::Image::*)(const std::string&) )&Magick::Image::ping) .def("ping", (void (Magick::Image::*)(const Magick::Blob&) )&Magick::Image::ping) .def("quantize", &Magick::Image::quantize, Magick_Image_quantize_overloads_0_1()) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("quantumOperator", (void (Magick::Image::*)(const Magick::ChannelType, const Magick::MagickEvaluateOperator, double))&Magick::Image::quantumOperator) .def("quantumOperator", (void (Magick::Image::*)(const ::ssize_t, const ::ssize_t, const size_t, const size_t, const Magick::ChannelType, const Magick::MagickEvaluateOperator, const double))&Magick::Image::quantumOperator) #else .def("quantumOperator", (void (Magick::Image::*)(const Magick::ChannelType, const Magick::QuantumOperator, const double))&Magick::Image::quantumOperator) .def("quantumOperator", (void (Magick::Image::*)(const int, const int, const unsigned int, const unsigned int, const Magick::ChannelType, const Magick::QuantumOperator, const double))&Magick::Image::quantumOperator) #endif .def("process", &Magick::Image::process) .def("raiseEdge", &Magick::Image::raise, Magick_Image_raise_overloads_0_2()) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_x .def("randomThreshold", &Magick::Image::randomThreshold) .def("randomThresholdChannel", &Magick::Image::randomThresholdChannel) #endif .def("read", (void (Magick::Image::*)(const std::string&) )&Magick::Image::read) .def("read", (void (Magick::Image::*)(const Magick::Geometry&, const std::string&) )&Magick::Image::read) .def("read", (void (Magick::Image::*)(const Magick::Blob&) )&Magick::Image::read) .def("read", (void (Magick::Image::*)(const Magick::Blob&, const Magick::Geometry&) )&Magick::Image::read) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("read", (void (Magick::Image::*)(const Magick::Blob&, const Magick::Geometry&, const size_t) )&Magick::Image::read) .def("read", (void (Magick::Image::*)(const Magick::Blob&, const Magick::Geometry&, const size_t, const std::string&) )&Magick::Image::read) #else .def("read", (void (Magick::Image::*)(const Magick::Blob&, const Magick::Geometry&, const unsigned int) )&Magick::Image::read) .def("read", (void (Magick::Image::*)(const Magick::Blob&, const Magick::Geometry&, const unsigned int, const std::string&) )&Magick::Image::read) #endif .def("read", (void (Magick::Image::*)(const Magick::Blob&, const Magick::Geometry&, const std::string&) )&Magick::Image::read) .def("reduceNoise", (void (Magick::Image::*)() )&Magick::Image::reduceNoise) .def("reduceNoise", (void (Magick::Image::*)(const double) )&Magick::Image::reduceNoise) .def("roll", (void (Magick::Image::*)(const Magick::Geometry&) )&Magick::Image::roll) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("roll", (void (Magick::Image::*)(const size_t, const size_t) )&Magick::Image::roll) #else .def("roll", (void (Magick::Image::*)(const unsigned int, const unsigned int) )&Magick::Image::roll) #endif .def("rotate", &Magick::Image::rotate) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_19_OVER .def("thumbnail", &Magick::Image::thumbnail) #endif .def("sample", &Magick::Image::sample) .def("scale", &Magick::Image::scale) .def("segment", &Magick::Image::segment, Magick_Image_segment_overloads_0_2()) .def("shade", &Magick::Image::shade, Magick_Image_shade_overloads_0_3()) .def("sharpen", &Magick::Image::sharpen, Magick_Image_sharpen_overloads_0_2()) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_x .def("sharpenChannel", &Magick::Image::sharpenChannel, Magick_Image_sharpenChannel_overloads_1_3()) #endif .def("shave", &Magick::Image::shave) .def("shear", &Magick::Image::shear) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("sigmoidalContrast", &Magick::Image::sigmoidalContrast, Magick_Image_sigmoidalContrast_overloads_2_3()) #endif .def("solarize", &Magick::Image::solarize, Magick_Image_solarize_overloads_0_1()) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("splice", &Magick::Image::splice) #endif .def("spread", &Magick::Image::spread, Magick_Image_spread_overloads_0_1()) #ifdef PGMAGICK_LIB_IMAGEMAGICK // FIXME: not worked .def("sparseColor", &Magick::Image::sparseColor) #endif .def("stegano", &Magick::Image::stegano) .def("stereo", &Magick::Image::stereo) .def("swirl", &Magick::Image::swirl) .def("texture", &Magick::Image::texture) .def("threshold", &Magick::Image::threshold) .def("transform", (void (Magick::Image::*)(const Magick::Geometry&) )&Magick::Image::transform) .def("transform", (void (Magick::Image::*)(const Magick::Geometry&, const Magick::Geometry&) )&Magick::Image::transform) .def("transparent", &Magick::Image::transparent) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("transparentChroma", &Magick::Image::transparentChroma) #endif .def("trim", &Magick::Image::trim) .def("type", (void (Magick::Image::*)(const Magick::ImageType))&Magick::Image::type) .def("unsharpmask", &Magick::Image::unsharpmask) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_x .def("unsharpmaskChannel", &Magick::Image::unsharpmaskChannel) #endif #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("unsharpmaskChannel", &Magick::Image::unsharpmaskChannel) #endif .def("wave", &Magick::Image::wave, Magick_Image_wave_overloads_0_2()) .def("write", (void (Magick::Image::*)(const std::string&) )&Magick::Image::write) .def("write", (void (Magick::Image::*)(Magick::Blob*) )&Magick::Image::write) .def("write", (void (Magick::Image::*)(Magick::Blob*, const std::string&) )&Magick::Image::write) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("write", (void (Magick::Image::*)(Magick::Blob*, const std::string&, const size_t) )&Magick::Image::write) #else .def("write", (void (Magick::Image::*)(Magick::Blob*, const std::string&, const unsigned int) )&Magick::Image::write) #endif .def("zoom", &Magick::Image::zoom) .def("adjoin", (void (Magick::Image::*)(const bool) )&Magick::Image::adjoin) .def("adjoin", (bool (Magick::Image::*)() const)&Magick::Image::adjoin) .def("antiAlias", (void (Magick::Image::*)(const bool) )&Magick::Image::antiAlias) .def("antiAlias", (bool (Magick::Image::*)() )&Magick::Image::antiAlias) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("animationDelay", (void (Magick::Image::*)(const size_t) )&Magick::Image::animationDelay) .def("animationDelay", (size_t (Magick::Image::*)() const)&Magick::Image::animationDelay) .def("animationIterations", (void (Magick::Image::*)(const size_t) )&Magick::Image::animationIterations) .def("animationIterations", (size_t (Magick::Image::*)() const)&Magick::Image::animationIterations) #else .def("animationDelay", (void (Magick::Image::*)(const unsigned int) )&Magick::Image::animationDelay) .def("animationDelay", (unsigned int (Magick::Image::*)() const)&Magick::Image::animationDelay) .def("animationIterations", (void (Magick::Image::*)(const unsigned int) )&Magick::Image::animationIterations) .def("animationIterations", (unsigned int (Magick::Image::*)() const)&Magick::Image::animationIterations) #endif .def("attribute", (void (Magick::Image::*)(const std::string, const std::string) )&Magick::Image::attribute) .def("attribute", (std::string (Magick::Image::*)(const std::string) )&Magick::Image::attribute) .def("backgroundColor", (void (Magick::Image::*)(const Magick::Color&) )&Magick::Image::backgroundColor) .def("backgroundColor", (Magick::Color (Magick::Image::*)() const)&Magick::Image::backgroundColor) .def("backgroundTexture", (void (Magick::Image::*)(const std::string&) )&Magick::Image::backgroundTexture) .def("backgroundTexture", (std::string (Magick::Image::*)() const)&Magick::Image::backgroundTexture) .def("baseColumns", &Magick::Image::baseColumns) .def("baseFilename", &Magick::Image::baseFilename) .def("baseRows", &Magick::Image::baseRows) .def("borderColor", (void (Magick::Image::*)(const Magick::Color&) )&Magick::Image::borderColor) .def("borderColor", (Magick::Color (Magick::Image::*)() const)&Magick::Image::borderColor) .def("boundingBox", &Magick::Image::boundingBox) .def("boxColor", (void (Magick::Image::*)(const Magick::Color&) )&Magick::Image::boxColor) .def("boxColor", (Magick::Color (Magick::Image::*)() const)&Magick::Image::boxColor) .def("cacheThreshold", &Magick::Image::cacheThreshold) .def("chromaBluePrimary", (void (Magick::Image::*)(const double, const double) )&Magick::Image::chromaBluePrimary) .def("chromaBluePrimary", (void (Magick::Image::*)(double*, double*) const)&Magick::Image::chromaBluePrimary) .def("chromaGreenPrimary", (void (Magick::Image::*)(const double, const double) )&Magick::Image::chromaGreenPrimary) .def("chromaGreenPrimary", (void (Magick::Image::*)(double*, double*) const)&Magick::Image::chromaGreenPrimary) .def("chromaRedPrimary", (void (Magick::Image::*)(const double, const double) )&Magick::Image::chromaRedPrimary) .def("chromaRedPrimary", (void (Magick::Image::*)(double*, double*) const)&Magick::Image::chromaRedPrimary) .def("chromaWhitePoint", (void (Magick::Image::*)(const double, const double) )&Magick::Image::chromaWhitePoint) .def("chromaWhitePoint", (void (Magick::Image::*)(double*, double*) const)&Magick::Image::chromaWhitePoint) .def("classType", (void (Magick::Image::*)(const Magick::ClassType) )&Magick::Image::classType) .def("classType", (Magick::ClassType (Magick::Image::*)() const)&Magick::Image::classType) .def("clipMask", (void (Magick::Image::*)(const Magick::Image&) )&Magick::Image::clipMask) .def("clipMask", (Magick::Image (Magick::Image::*)() const)&Magick::Image::clipMask) .def("colorFuzz", (void (Magick::Image::*)(const double) )&Magick::Image::colorFuzz) .def("colorFuzz", (double (Magick::Image::*)() const)&Magick::Image::colorFuzz) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("colorMap", (void (Magick::Image::*)(const size_t, const Magick::Color&) )&Magick::Image::colorMap) .def("colorMap", (Magick::Color (Magick::Image::*)(const size_t) const)&Magick::Image::colorMap) .def("colorMapSize", (void (Magick::Image::*)(const size_t) )&Magick::Image::colorMapSize) .def("colorMapSize", (size_t (Magick::Image::*)() )&Magick::Image::colorMapSize) #else .def("colorMap", (void (Magick::Image::*)(const unsigned int, const Magick::Color&) )&Magick::Image::colorMap) .def("colorMap", (Magick::Color (Magick::Image::*)(const unsigned int) const)&Magick::Image::colorMap) .def("colorMapSize", (void (Magick::Image::*)(const unsigned int) )&Magick::Image::colorMapSize) .def("colorMapSize", (unsigned int (Magick::Image::*)() )&Magick::Image::colorMapSize) #endif .def("colorSpace", (void (Magick::Image::*)(const Magick::ColorspaceType))&Magick::Image::colorSpace) .def("colorSpace", (Magick::ColorspaceType (Magick::Image::*)() const)&Magick::Image::colorSpace) .def("columns", &Magick::Image::columns) .def("comment", (std::string (Magick::Image::*)() const)&Magick::Image::comment) .def("compose", (void (Magick::Image::*)(const Magick::CompositeOperator))&Magick::Image::compose) .def("compose", (Magick::CompositeOperator (Magick::Image::*)() const)&Magick::Image::compose) .def("compressType", (void (Magick::Image::*)(const Magick::CompressionType))&Magick::Image::compressType) .def("compressType", (Magick::CompressionType (Magick::Image::*)() const)&Magick::Image::compressType) .def("debug", (void (Magick::Image::*)(const bool) )&Magick::Image::debug) .def("debug", (bool (Magick::Image::*)() const)&Magick::Image::debug) .def("defineValue", (void (Magick::Image::*)(const std::string&, const std::string&, const std::string&) )&Magick::Image::defineValue) .def("defineValue", (std::string (Magick::Image::*)(const std::string&, const std::string&) const)&Magick::Image::defineValue) .def("defineSet", (void (Magick::Image::*)(const std::string&, const std::string&, bool) )&Magick::Image::defineSet) .def("defineSet", (bool (Magick::Image::*)(const std::string&, const std::string&) const)&Magick::Image::defineSet) .def("density", (void (Magick::Image::*)(const Magick::Geometry&) )&Magick::Image::density) .def("density", (Magick::Geometry (Magick::Image::*)() const)&Magick::Image::density) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("depth", (void (Magick::Image::*)(const size_t) )&Magick::Image::depth) .def("depth", (size_t (Magick::Image::*)() const)&Magick::Image::depth) #else .def("depth", (void (Magick::Image::*)(const unsigned int) )&Magick::Image::depth) .def("depth", (unsigned int (Magick::Image::*)() const)&Magick::Image::depth) #endif .def("directory", &Magick::Image::directory) .def("endian", (void (Magick::Image::*)(const Magick::EndianType))&Magick::Image::endian) .def("endian", (Magick::EndianType (Magick::Image::*)() const)&Magick::Image::endian) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("exifProfile", (void (Magick::Image::*)(const Magick::Blob&))&Magick::Image::exifProfile) .def("exifProfile", (Magick::Blob (Magick::Image::*)() const)&Magick::Image::exifProfile) #endif .def("fileName", (void (Magick::Image::*)(const std::string&) )&Magick::Image::fileName) .def("fileName", (std::string (Magick::Image::*)() const)&Magick::Image::fileName) .def("fileSize", &Magick::Image::fileSize) .def("fillColor", (void (Magick::Image::*)(const Magick::Color&) )&Magick::Image::fillColor) .def("fillColor", (Magick::Color (Magick::Image::*)() const)&Magick::Image::fillColor) .def("fillRule", (void (Magick::Image::*)(const Magick::FillRule&))&Magick::Image::fillRule) .def("fillRule", (Magick::FillRule (Magick::Image::*)(void) const)&Magick::Image::fillRule) .def("fillPattern", (void (Magick::Image::*)(const Magick::Image&) )&Magick::Image::fillPattern) .def("fillPattern", (Magick::Image (Magick::Image::*)() const)&Magick::Image::fillPattern) .def("filterType", (void (Magick::Image::*)(const Magick::FilterTypes) )&Magick::Image::filterType) .def("filterType", (Magick::FilterTypes (Magick::Image::*)(void) const)&Magick::Image::filterType) .def("font", (void (Magick::Image::*)(const std::string&) )&Magick::Image::font) .def("font", (std::string (Magick::Image::*)() const)&Magick::Image::font) .def("fontPointsize", (void (Magick::Image::*)(const double) )&Magick::Image::fontPointsize) .def("fontPointsize", (double (Magick::Image::*)() const)&Magick::Image::fontPointsize) .def("fontTypeMetrics", &Magick::Image::fontTypeMetrics) .def("format", &Magick::Image::format) .def("gamma", (double (Magick::Image::*)() const)&Magick::Image::gamma) .def("geometry", &Magick::Image::geometry) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("gifDisposeMethod", (void (Magick::Image::*)(const size_t) )&Magick::Image::gifDisposeMethod) .def("gifDisposeMethod", (size_t (Magick::Image::*)() const)&Magick::Image::gifDisposeMethod) #else .def("gifDisposeMethod", (void (Magick::Image::*)(const unsigned int) )&Magick::Image::gifDisposeMethod) .def("gifDisposeMethod", (unsigned int (Magick::Image::*)() const)&Magick::Image::gifDisposeMethod) #endif .def("iccColorProfile", (void (Magick::Image::*)(const Magick::Blob&) )&Magick::Image::iccColorProfile) .def("iccColorProfile", (Magick::Blob (Magick::Image::*)() const)&Magick::Image::iccColorProfile) .def("interlaceType", (void (Magick::Image::*)(const Magick::InterlaceType))&Magick::Image::interlaceType) .def("interlaceType", (Magick::InterlaceType (Magick::Image::*)() const)&Magick::Image::interlaceType) .def("iptcProfile", (void (Magick::Image::*)(const Magick::Blob&) )&Magick::Image::iptcProfile) .def("iptcProfile", (Magick::Blob (Magick::Image::*)() const)&Magick::Image::iptcProfile) .def("isValid", (void (Magick::Image::*)(const bool) )&Magick::Image::isValid) .def("isValid", (bool (Magick::Image::*)() const)&Magick::Image::isValid) .def("label", (std::string (Magick::Image::*)() const)&Magick::Image::label) .def("lineWidth", (void (Magick::Image::*)(const double) )&Magick::Image::lineWidth) .def("lineWidth", (double (Magick::Image::*)() const)&Magick::Image::lineWidth) .def("magick", (void (Magick::Image::*)(const std::string&) )&Magick::Image::magick) .def("magick", (std::string (Magick::Image::*)() const)&Magick::Image::magick) .def("matte", (void (Magick::Image::*)(const bool) )&Magick::Image::matte) .def("matte", (bool (Magick::Image::*)() const)&Magick::Image::matte) .def("matteColor", (void (Magick::Image::*)(const Magick::Color&) )&Magick::Image::matteColor) .def("matteColor", (Magick::Color (Magick::Image::*)() const)&Magick::Image::matteColor) .def("meanErrorPerPixel", &Magick::Image::meanErrorPerPixel) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("modulusDepth", (void (Magick::Image::*)(const size_t) )&Magick::Image::modulusDepth) .def("modulusDepth", (size_t (Magick::Image::*)() const)&Magick::Image::modulusDepth) #else .def("modulusDepth", (void (Magick::Image::*)(const unsigned int) )&Magick::Image::modulusDepth) .def("modulusDepth", (unsigned int (Magick::Image::*)() const)&Magick::Image::modulusDepth) #endif .def("montageGeometry", &Magick::Image::montageGeometry) .def("monochrome", (void (Magick::Image::*)(const bool) )&Magick::Image::monochrome) .def("monochrome", (bool (Magick::Image::*)() const)&Magick::Image::monochrome) .def("normalizedMaxError", &Magick::Image::normalizedMaxError) .def("normalizedMeanError", &Magick::Image::normalizedMeanError) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_x .def("orientation", (void (Magick::Image::*)(const Magick::OrientationType))&Magick::Image::orientation) .def("orientation", (Magick::OrientationType (Magick::Image::*)() const)&Magick::Image::orientation) #endif .def("page", (void (Magick::Image::*)(const Magick::Geometry&) )&Magick::Image::page) .def("page", (Magick::Geometry (Magick::Image::*)() const)&Magick::Image::page) .def("penColor", (void (Magick::Image::*)(const Magick::Color&) )&Magick::Image::penColor) .def("penColor", (Magick::Color (Magick::Image::*)() const)&Magick::Image::penColor) .def("penTexture", (void (Magick::Image::*)(const Magick::Image&) )&Magick::Image::penTexture) .def("penTexture", (Magick::Image (Magick::Image::*)() const)&Magick::Image::penTexture) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("pixelColor", (void (Magick::Image::*)(const ::ssize_t, const ::ssize_t, const Magick::Color&))&Magick::Image::pixelColor) .def("pixelColor", (Magick::Color (Magick::Image::*)(const ::ssize_t, const ::ssize_t) const)&Magick::Image::pixelColor) #else .def("pixelColor", (void (Magick::Image::*)(const unsigned int, const unsigned int, const Magick::Color&))&Magick::Image::pixelColor) .def("pixelColor", (Magick::Color (Magick::Image::*)(const unsigned int, const unsigned int) const)&Magick::Image::pixelColor) #endif .def("profile", (void (Magick::Image::*)(const std::string, const Magick::Blob&))&Magick::Image::profile) .def("profile", (Magick::Blob (Magick::Image::*)(const std::string) const)&Magick::Image::profile) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("quality", (void (Magick::Image::*)(const size_t) )&Magick::Image::quality) .def("quality", (size_t (Magick::Image::*)() const)&Magick::Image::quality) .def("quantizeColors", (void (Magick::Image::*)(const size_t) )&Magick::Image::quantizeColors) .def("quantizeColors", (size_t (Magick::Image::*)() const)&Magick::Image::quantizeColors) #else .def("quality", (void (Magick::Image::*)(const unsigned int) )&Magick::Image::quality) .def("quality", (unsigned int (Magick::Image::*)() const)&Magick::Image::quality) .def("quantizeColors", (void (Magick::Image::*)(const unsigned int) )&Magick::Image::quantizeColors) .def("quantizeColors", (unsigned int (Magick::Image::*)() const)&Magick::Image::quantizeColors) #endif .def("quantizeColorSpace", (void (Magick::Image::*)(const Magick::ColorspaceType) )&Magick::Image::quantizeColorSpace) .def("quantizeColorSpace", (Magick::ColorspaceType (Magick::Image::*)() const)&Magick::Image::quantizeColorSpace) .def("quantizeDither", (void (Magick::Image::*)(const bool) )&Magick::Image::quantizeDither) .def("quantizeDither", (bool (Magick::Image::*)() const)&Magick::Image::quantizeDither) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("quantizeTreeDepth", (void (Magick::Image::*)(const size_t) )&Magick::Image::quantizeTreeDepth) .def("quantizeTreeDepth", (size_t (Magick::Image::*)() const)&Magick::Image::quantizeTreeDepth) #else .def("quantizeTreeDepth", (void (Magick::Image::*)(const unsigned int) )&Magick::Image::quantizeTreeDepth) .def("quantizeTreeDepth", (unsigned int (Magick::Image::*)() const)&Magick::Image::quantizeTreeDepth) #endif .def("renderingIntent", (void (Magick::Image::*)(const Magick::RenderingIntent) )&Magick::Image::renderingIntent) .def("renderingIntent", (Magick::RenderingIntent (Magick::Image::*)() const)&Magick::Image::renderingIntent) .def("resolutionUnits", (void (Magick::Image::*)(const Magick::ResolutionType) )&Magick::Image::resolutionUnits) .def("resolutionUnits", (Magick::ResolutionType (Magick::Image::*)() const)&Magick::Image::resolutionUnits) .def("rows", &Magick::Image::rows) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("scene", (void (Magick::Image::*)(const size_t) )&Magick::Image::scene) .def("scene", (size_t (Magick::Image::*)() const)&Magick::Image::scene) #else .def("scene", (void (Magick::Image::*)(const unsigned int) )&Magick::Image::scene) .def("scene", (unsigned int (Magick::Image::*)() const)&Magick::Image::scene) #endif .def("signature", &Magick::Image::signature, Magick_Image_signature_overloads_0_1()) .def("size", (void (Magick::Image::*)(const Magick::Geometry&) )&Magick::Image::size) .def("size", (Magick::Geometry (Magick::Image::*)() const)&Magick::Image::size) .def("statistics", &Magick::Image::statistics) .def("strokeAntiAlias", (void (Magick::Image::*)(const bool) )&Magick::Image::strokeAntiAlias) .def("strokeAntiAlias", (bool (Magick::Image::*)() const)&Magick::Image::strokeAntiAlias) .def("strokeColor", (void (Magick::Image::*)(const Magick::Color&) )&Magick::Image::strokeColor) .def("strokeColor", (Magick::Color (Magick::Image::*)() const)&Magick::Image::strokeColor) .def("strokeDashArray", (void (Magick::Image::*)(const double*) )&Magick::Image::strokeDashArray) #if 0 .def("strokeDashArray", (const double* (Magick::Image::*)() const)&Magick::Image::strokeDashArray) #endif .def("strokeDashOffset", (void (Magick::Image::*)(const double) )&Magick::Image::strokeDashOffset) .def("strokeDashOffset", (double (Magick::Image::*)() const)&Magick::Image::strokeDashOffset) .def("strokeLineCap", (void (Magick::Image::*)(const Magick::LineCap) )&Magick::Image::strokeLineCap) .def("strokeLineCap", (Magick::LineCap (Magick::Image::*)() const)&Magick::Image::strokeLineCap) .def("strokeLineJoin", (void (Magick::Image::*)(const Magick::LineJoin) )&Magick::Image::strokeLineJoin) .def("strokeLineJoin", (Magick::LineJoin (Magick::Image::*)() const)&Magick::Image::strokeLineJoin) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("strokeMiterLimit", (void (Magick::Image::*)(const size_t) )&Magick::Image::strokeMiterLimit) .def("strokeMiterLimit", (size_t (Magick::Image::*)() const)&Magick::Image::strokeMiterLimit) #else .def("strokeMiterLimit", (void (Magick::Image::*)(const unsigned int) )&Magick::Image::strokeMiterLimit) .def("strokeMiterLimit", (unsigned int (Magick::Image::*)() const)&Magick::Image::strokeMiterLimit) #endif .def("strokePattern", (void (Magick::Image::*)(const Magick::Image&) )&Magick::Image::strokePattern) .def("strokePattern", (Magick::Image (Magick::Image::*)() const)&Magick::Image::strokePattern) .def("strokeWidth", (void (Magick::Image::*)(const double) )&Magick::Image::strokeWidth) .def("strokeWidth", (double (Magick::Image::*)() const)&Magick::Image::strokeWidth) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("subImage", (void (Magick::Image::*)(const size_t) )&Magick::Image::subImage) .def("subImage", (size_t (Magick::Image::*)() const)&Magick::Image::subImage) .def("subRange", (void (Magick::Image::*)(const size_t) )&Magick::Image::subRange) .def("subRange", (size_t (Magick::Image::*)() const)&Magick::Image::subRange) #else .def("subImage", (void (Magick::Image::*)(const unsigned int) )&Magick::Image::subImage) .def("subImage", (unsigned int (Magick::Image::*)() const)&Magick::Image::subImage) .def("subRange", (void (Magick::Image::*)(const unsigned int) )&Magick::Image::subRange) .def("subRange", (unsigned int (Magick::Image::*)() const)&Magick::Image::subRange) #endif .def("textEncoding", (void (Magick::Image::*)(const std::string&) )&Magick::Image::textEncoding) .def("textEncoding", (std::string (Magick::Image::*)() const)&Magick::Image::textEncoding) .def("tileName", (void (Magick::Image::*)(const std::string&) )&Magick::Image::tileName) .def("tileName", (std::string (Magick::Image::*)() const)&Magick::Image::tileName) .def("totalColors", &Magick::Image::totalColors) .def("transformOrigin", &Magick::Image::transformOrigin) .def("transformRotation", &Magick::Image::transformRotation) .def("transformReset", &Magick::Image::transformReset) .def("transformScale", &Magick::Image::transformScale) .def("transformSkewX", &Magick::Image::transformSkewX) .def("transformSkewY", &Magick::Image::transformSkewY) .def("type", (Magick::ImageType (Magick::Image::*)() const)&Magick::Image::type) .def("verbose", (void (Magick::Image::*)(const bool) )&Magick::Image::verbose) .def("verbose", (bool (Magick::Image::*)() const)&Magick::Image::verbose) .def("view", (void (Magick::Image::*)(const std::string&) )&Magick::Image::view) .def("view", (std::string (Magick::Image::*)() const)&Magick::Image::view) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("virtualPixelMethod", (void (Magick::Image::*)(const Magick::VirtualPixelMethod))&Magick::Image::virtualPixelMethod) .def("virtualPixelMethod", (Magick::VirtualPixelMethod (Magick::Image::*)() const)&Magick::Image::virtualPixelMethod) #endif .def("x11Display", (void (Magick::Image::*)(const std::string&) )&Magick::Image::x11Display) .def("x11Display", (std::string (Magick::Image::*)() const)&Magick::Image::x11Display) .def("xResolution", &Magick::Image::xResolution) .def("yResolution", &Magick::Image::yResolution) #if 0 .def("getConstPixels",) .def("getIndexes",) .def("getConstIndexes",) .def("getPixels",) .def("setPixels",) #endif .def("syncPixels", &Magick::Image::syncPixels) .def("readPixels", &Magick::Image::readPixels) .def("writePixels", &Magick::Image::writePixels) /* no user-serviceable parts */ .def("modifyImage", &Magick::Image::modifyImage) #if !defined(PGMAGICK_LIB_GRAPHICSMAGICK_1_3_20) && !defined(PGMAGICK_LIB_GRAPHICSMAGICK_1_3_22) .def("throwImageException", &Magick::Image::throwImageException) #endif .def("registerId", &Magick::Image::registerId) .def("unregisterId", &Magick::Image::unregisterId) .staticmethod("cacheThreshold") .def( self == self ) .def( self != self ) .def( self > self ) .def( self < self ) .def( self >= self ) .def( self <= self ) ; } pgmagick-0.6/src/_ImageType.cpp0000644000076500000240000000152212620311264017476 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __ImageType() { enum_< Magick::ImageType >("ImageType") .value("UndefinedType", Magick::UndefinedType) .value("BilevelType", Magick::BilevelType) .value("GrayscaleType", Magick::GrayscaleType) .value("GrayscaleMatteType", Magick::GrayscaleMatteType) .value("PaletteType", Magick::PaletteType) .value("PaletteMatteType", Magick::PaletteMatteType) .value("TrueColorType", Magick::TrueColorType) .value("TrueColorMatteType", Magick::TrueColorMatteType) .value("ColorSeparationType", Magick::ColorSeparationType) .value("ColorSeparationMatteType", Magick::ColorSeparationMatteType) .value("OptimizeType", Magick::OptimizeType) ; } pgmagick-0.6/src/_InterlaceType.cpp0000644000076500000240000000076412620311264020371 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __InterlaceType() { enum_< Magick::InterlaceType >("InterlaceType") .value("UndefinedInterlace", Magick::UndefinedInterlace) .value("NoInterlace", Magick::NoInterlace) .value("LineInterlace", Magick::LineInterlace) .value("PlaneInterlace", Magick::PlaneInterlace) .value("PartitionInterlace", Magick::PartitionInterlace) ; } pgmagick-0.6/src/_LineCap.cpp0000644000076500000240000000057112620311264017130 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __LineCap() { enum_< Magick::LineCap >("LineCap") .value("UndefinedCap", Magick::UndefinedCap) .value("ButtCap", Magick::ButtCap) .value("RoundCap", Magick::RoundCap) .value("SquareCap", Magick::SquareCap) ; } pgmagick-0.6/src/_LineJoin.cpp0000644000076500000240000000060412620311264017321 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __LineJoin() { enum_< Magick::LineJoin >("LineJoin") .value("UndefinedJoin", Magick::UndefinedJoin) .value("MiterJoin", Magick::MiterJoin) .value("RoundJoin", Magick::RoundJoin) .value("BevelJoin", Magick::BevelJoin) ; } pgmagick-0.6/src/_main.cpp0000644000076500000240000001272612620346712016554 0ustar hattori-hstaff00000000000000#include #include void __Blob(); void __ChannelType(); void __Color(); void __ColorspaceType(); void __CompositeOperator(); void __CompressionType(); void __Coordinate(); void __DecorationType(); void __DistortImageMethod(); void __Drawable(); void __DrawableAffine(); void __DrawableArc(); void __DrawableBezier(); void __DrawableCircle(); void __DrawableClipPath(); void __DrawableColor(); void __DrawableCompositeImage(); void __DrawableDashArray(); void __DrawableDashOffset(); void __DrawableEllipse(); void __DrawableFillColor(); void __DrawableFillOpacity(); void __DrawableFillRule(); void __DrawableFont(); void __DrawableGravity(); void __DrawableLine(); void __DrawableMatte(); void __DrawableMiterLimit(); void __DrawablePath(); void __DrawablePoint(); void __DrawablePointSize(); void __DrawablePolygon(); void __DrawablePolyline(); void __DrawablePopClipPath(); void __DrawablePopGraphicContext(); void __DrawablePopPattern(); void __DrawablePushClipPath(); void __DrawablePushGraphicContext(); void __DrawablePushPattern(); void __DrawableRectangle(); void __DrawableRotation(); void __DrawableRoundRectangle(); void __DrawableScaling(); void __DrawableSkewX(); void __DrawableSkewY(); void __DrawableStrokeAntialias(); void __DrawableStrokeColor(); void __DrawableStrokeLineCap(); void __DrawableStrokeLineJoin(); void __DrawableStrokeOpacity(); void __DrawableStrokeWidth(); void __DrawableText(); void __DrawableTextAntialias(); void __DrawableTextDecoration(); void __DrawableTextUnderColor(); void __DrawableTranslation(); void __DrawableViewbox(); void __EndianType(); void __Exception(); void __FillRule(); void __FilterTypes(); void __Geometry(); void __GravityType(); void __Image(); void __ImageType(); void __InterlaceType(); void __LineCap(); void __LineJoin(); void __Montage(); void __NoiseType(); void __OrientationType(); void __PaintMethod(); void __PathArcAbs(); void __PathArcArgs(); void __PathArcRel(); void __PathClosePath(); void __PathCurvetoAbs(); void __PathCurvetoArgs(); void __PathCurvetoRel(); void __PathLinetoAbs(); void __PathLinetoHorizontalAbs(); void __PathLinetoHorizontalRel(); void __PathLinetoRel(); void __PathLinetoVerticalAbs(); void __PathLinetoVerticalRel(); void __PathMovetoAbs(); void __PathMovetoRel(); void __PathQuadraticCurvetoAbs(); void __PathQuadraticCurvetoArgs(); void __PathQuadraticCurvetoRel(); void __PathSmoothCurvetoAbs(); void __PathSmoothCurvetoRel(); void __PathSmoothQuadraticCurvetoAbs(); void __PathSmoothQuadraticCurvetoRel(); void __Pixels(); void __QuantumOperator(); void __QuantumType(); void __RenderingIntent(); void __ResolutionType(); void __SparseColorMethod(); void __StorageType(); void __StretchType(); void __StyleType(); void __STL(); void __TypeMetric(); void __VirtualPixelMethod(); void __VPath(); void __gminfo(); BOOST_PYTHON_MODULE(_pgmagick) { __Blob(); __ChannelType(); __Color(); __ColorspaceType(); __CompositeOperator(); __CompressionType(); __Coordinate(); __DecorationType(); __DistortImageMethod(); __VPath(); __Drawable(); __DrawableAffine(); __DrawableArc(); __DrawableBezier(); __DrawableCircle(); __DrawableClipPath(); __DrawableColor(); __DrawableCompositeImage(); __DrawableDashArray(); __DrawableDashOffset(); __DrawableEllipse(); __DrawableFillColor(); __DrawableFillOpacity(); __DrawableFillRule(); __DrawableFont(); __DrawableGravity(); __DrawableLine(); __DrawableMatte(); __DrawableMiterLimit(); __DrawablePath(); __DrawablePoint(); __DrawablePointSize(); __DrawablePolygon(); __DrawablePolyline(); __DrawablePopClipPath(); __DrawablePopGraphicContext(); __DrawablePopPattern(); __DrawablePushClipPath(); __DrawablePushGraphicContext(); __DrawablePushPattern(); __DrawableRectangle(); __DrawableRotation(); __DrawableRoundRectangle(); __DrawableScaling(); __DrawableSkewX(); __DrawableSkewY(); __DrawableStrokeAntialias(); __DrawableStrokeColor(); __DrawableStrokeLineCap(); __DrawableStrokeLineJoin(); __DrawableStrokeOpacity(); __DrawableStrokeWidth(); __DrawableText(); __DrawableTextAntialias(); __DrawableTextDecoration(); __DrawableTextUnderColor(); __DrawableTranslation(); __DrawableViewbox(); __EndianType(); __Exception(); __FillRule(); __FilterTypes(); __Geometry(); __GravityType(); __Image(); __ImageType(); __InterlaceType(); __LineCap(); __LineJoin(); __Montage(); __NoiseType(); __OrientationType(); __PaintMethod(); __PathArcAbs(); __PathArcArgs(); __PathArcRel(); __PathClosePath(); __PathCurvetoAbs(); __PathCurvetoArgs(); __PathCurvetoRel(); __PathLinetoAbs(); __PathLinetoHorizontalAbs(); __PathLinetoHorizontalRel(); __PathLinetoRel(); __PathLinetoVerticalAbs(); __PathLinetoVerticalRel(); __PathMovetoAbs(); __PathMovetoRel(); __PathQuadraticCurvetoAbs(); __PathQuadraticCurvetoArgs(); __PathQuadraticCurvetoRel(); __PathSmoothCurvetoAbs(); __PathSmoothCurvetoRel(); __PathSmoothQuadraticCurvetoAbs(); __PathSmoothQuadraticCurvetoRel(); __Pixels(); __QuantumOperator(); __QuantumType(); __RenderingIntent(); __ResolutionType(); __SparseColorMethod(); __StorageType(); __StretchType(); __StyleType(); __STL(); __TypeMetric(); __VirtualPixelMethod(); __gminfo(); } pgmagick-0.6/src/_Montage.cpp0000644000076500000240000001203012620311264017200 0ustar hattori-hstaff00000000000000#include #include using namespace boost::python; void __Montage() { class_< Magick::Montage >("Montage", init< >()) .def("backgroundColor", (void (Magick::Montage::*)(const Magick::Color&)) &Magick::Montage::backgroundColor) .def("backgroundColor", (Magick::Color (Magick::Montage::*)() const) &Magick::Montage::backgroundColor) .def("compose", (void (Magick::Montage::*)(const Magick::CompositeOperator)) &Magick::Montage::compose) .def("compose", (Magick::CompositeOperator (Magick::Montage::*)() const) &Magick::Montage::compose) .def("fileName", (void (Magick::Montage::*)(const std::string&)) &Magick::Montage::fileName) .def("fileName", (std::string (Magick::Montage::*)() const) &Magick::Montage::fileName) .def("fillColor", (void (Magick::Montage::*)(const Magick::Color&)) &Magick::Montage::fillColor) .def("fillColor", (Magick::Color (Magick::Montage::*)() const) &Magick::Montage::fillColor) .def("geometry", (void (Magick::Montage::*)(const Magick::Geometry&)) &Magick::Montage::geometry) .def("geometry", (Magick::Geometry (Magick::Montage::*)() const) &Magick::Montage::geometry) .def("gravity", (void (Magick::Montage::*)(const Magick::GravityType)) &Magick::Montage::gravity) .def("gravity", (Magick::GravityType (Magick::Montage::*)() const) &Magick::Montage::gravity) .def("label", (void (Magick::Montage::*)(const std::string&)) &Magick::Montage::label) .def("label", (std::string (Magick::Montage::*)() const) &Magick::Montage::label) .def("penColor", (void (Magick::Montage::*)(const Magick::Color&)) &Magick::Montage::penColor) .def("penColor", (Magick::Color (Magick::Montage::*)() const) &Magick::Montage::penColor) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("pointSize", (void (Magick::Montage::*)(size_t)) &Magick::Montage::pointSize) .def("pointSize", (size_t (Magick::Montage::*)() const) &Magick::Montage::pointSize) #else .def("pointSize", (void (Magick::Montage::*)(unsigned int)) &Magick::Montage::pointSize) .def("pointSize", (unsigned int (Magick::Montage::*)() const) &Magick::Montage::pointSize) #endif .def("shadow", (void (Magick::Montage::*)(const bool)) &Magick::Montage::shadow) .def("shadow", (bool (Magick::Montage::*)() const) &Magick::Montage::shadow) .def("strokeColor", (void (Magick::Montage::*)(const Magick::Color&)) &Magick::Montage::strokeColor) .def("strokeColor", (Magick::Color (Magick::Montage::*)() const) &Magick::Montage::strokeColor) .def("texture", (void (Magick::Montage::*)(const std::string&)) &Magick::Montage::texture) .def("texture", (std::string (Magick::Montage::*)() const) &Magick::Montage::texture) .def("title", (void (Magick::Montage::*)(const std::string&)) &Magick::Montage::title) .def("title", (std::string (Magick::Montage::*)() const) &Magick::Montage::title) .def("transparentColor", (void (Magick::Montage::*)(const Magick::Color&)) &Magick::Montage::transparentColor) .def("transparentColor", (Magick::Color (Magick::Montage::*)() const) &Magick::Montage::transparentColor) ; class_< Magick::MontageFramed >("MontageFramed", init< >()) .def("borderColor", (void (Magick::MontageFramed::*)(const Magick::Color&)) &Magick::MontageFramed::borderColor) .def("borderColor", (Magick::Color (Magick::MontageFramed::*)() const) &Magick::MontageFramed::borderColor) #ifdef PGMAGICK_LIB_IMAGEMAGICK .def("borderWidth", (void (Magick::MontageFramed::*)(size_t)) &Magick::MontageFramed::borderWidth) .def("borderWidth", (size_t (Magick::MontageFramed::*)() const) &Magick::MontageFramed::borderWidth) #else .def("borderWidth", (void (Magick::MontageFramed::*)(unsigned int)) &Magick::MontageFramed::borderWidth) .def("borderWidth", (unsigned int (Magick::MontageFramed::*)() const) &Magick::MontageFramed::borderWidth) #endif .def("frameGeometry", (void (Magick::MontageFramed::*)(const Magick::Geometry&)) &Magick::MontageFramed::geometry) .def("frameGeometry", (Magick::Geometry (Magick::MontageFramed::*)() const) &Magick::MontageFramed::geometry) .def("matteColor", (void (Magick::MontageFramed::*)(const Magick::Color&)) &Magick::MontageFramed::matteColor) .def("matteColor", (Magick::Color (Magick::MontageFramed::*)() const) &Magick::MontageFramed::matteColor) ; } pgmagick-0.6/src/_NoiseType.cpp0000644000076500000240000000104412620311264017530 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __NoiseType() { enum_< Magick::NoiseType >("NoiseType") .value("UniformNise", Magick::UniformNoise) .value("GaussianNoise", Magick::GaussianNoise) .value("MultiplicativeGaussianNoise", Magick::MultiplicativeGaussianNoise) .value("ImpulseNoise", Magick::ImpulseNoise) .value("LaplacianNoise", Magick::LaplacianNoise) .value("PoissonNoise", Magick::PoissonNoise) ; } pgmagick-0.6/src/_OrientationType.cpp0000644000076500000240000000156212620311264020753 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __OrientationType() { #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_x enum_< Magick::OrientationType >("OrientationType") .value("UndefinedOrientation", Magick::UndefinedOrientation) .value("TopLeftOrientation", Magick::TopLeftOrientation) .value("TopRightOrientation", Magick::TopRightOrientation) .value("BottomRightOrientation", Magick::BottomRightOrientation) .value("BottomLeftOrientation", Magick::BottomLeftOrientation) .value("LeftTopOrientation", Magick::LeftTopOrientation) .value("RightTopOrientation", Magick::RightTopOrientation) .value("RightBottomOrientation", Magick::RightBottomOrientation) .value("LeftBottomOrientation", Magick::LeftBottomOrientation) ; #endif } pgmagick-0.6/src/_PaintMethod.cpp0000644000076500000240000000074212620311264020031 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __PaintMethod() { enum_< Magick::PaintMethod >("PaintMethod") .value("PointMethod", Magick::PointMethod) .value("ReplaceMethod", Magick::ReplaceMethod) .value("FloodfillMethod", Magick::FloodfillMethod) .value("FillToBorderMethod", Magick::FillToBorderMethod) .value("ResetMethod", Magick::ResetMethod) ; } pgmagick-0.6/src/_PathArcAbs.cpp0000644000076500000240000000164312620346712017574 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathArcAbs_Wrapper: Magick::PathArcAbs { Magick_PathArcAbs_Wrapper(PyObject* py_self_, const Magick::PathArcArgs& p0): Magick::PathArcAbs(p0), py_self(py_self_) {} Magick_PathArcAbs_Wrapper(PyObject* py_self_, const Magick::PathArcArgsList& p0): Magick::PathArcAbs(p0), py_self(py_self_) {} Magick_PathArcAbs_Wrapper(PyObject* py_self_, const Magick::PathArcAbs& p0): Magick::PathArcAbs(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathArcAbs() { class_< Magick::PathArcAbs, bases, Magick_PathArcAbs_Wrapper >("PathArcAbs", init< const Magick::PathArcArgs& >()) .def(init< const Magick::PathArcArgsList& >()) .def(init< const Magick::PathArcAbs& >()) ; } pgmagick-0.6/src/_PathArcArgs.cpp0000644000076500000240000000351412620311264017754 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; void __PathArcArgs() { class_< Magick::PathArcArgs >("PathArcArgs", init< >()) .def(init< double, double, double, bool, bool, double, double >()) .def(init< const Magick::PathArcArgs& >()) .def("radiusX", (void (Magick::PathArcArgs::*)(double) )&Magick::PathArcArgs::radiusX) .def("radiusX", (double (Magick::PathArcArgs::*)() const)&Magick::PathArcArgs::radiusX) .def("radiusY", (void (Magick::PathArcArgs::*)(double) )&Magick::PathArcArgs::radiusY) .def("radiusY", (double (Magick::PathArcArgs::*)() const)&Magick::PathArcArgs::radiusY) .def("xAxisRotation", (void (Magick::PathArcArgs::*)(double) )&Magick::PathArcArgs::xAxisRotation) .def("xAxisRotation", (double (Magick::PathArcArgs::*)() const)&Magick::PathArcArgs::xAxisRotation) .def("largeArcFlag", (void (Magick::PathArcArgs::*)(bool) )&Magick::PathArcArgs::largeArcFlag) .def("largeArcFlag", (bool (Magick::PathArcArgs::*)() const)&Magick::PathArcArgs::largeArcFlag) .def("sweepFlag", (void (Magick::PathArcArgs::*)(bool) )&Magick::PathArcArgs::sweepFlag) .def("sweepFlag", (bool (Magick::PathArcArgs::*)() const)&Magick::PathArcArgs::sweepFlag) .def("x", (void (Magick::PathArcArgs::*)(double) )&Magick::PathArcArgs::x) .def("x", (double (Magick::PathArcArgs::*)() const)&Magick::PathArcArgs::x) .def("y", (void (Magick::PathArcArgs::*)(double) )&Magick::PathArcArgs::y) .def("y", (double (Magick::PathArcArgs::*)() const)&Magick::PathArcArgs::y) .def( self != self ) .def( self > self ) .def( self <= self ) .def( self >= self ) .def( self < self ) .def( self == self ) ; } pgmagick-0.6/src/_PathArcRel.cpp0000644000076500000240000000164312620346712017611 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathArcRel_Wrapper: Magick::PathArcRel { Magick_PathArcRel_Wrapper(PyObject* py_self_, const Magick::PathArcArgs& p0): Magick::PathArcRel(p0), py_self(py_self_) {} Magick_PathArcRel_Wrapper(PyObject* py_self_, const Magick::PathArcArgsList& p0): Magick::PathArcRel(p0), py_self(py_self_) {} Magick_PathArcRel_Wrapper(PyObject* py_self_, const Magick::PathArcRel& p0): Magick::PathArcRel(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathArcRel() { class_< Magick::PathArcRel, bases, Magick_PathArcRel_Wrapper >("PathArcRel", init< const Magick::PathArcArgs& >()) .def(init< const Magick::PathArcArgsList& >()) .def(init< const Magick::PathArcRel& >()) ; } pgmagick-0.6/src/_PathClosePath.cpp0000644000076500000240000000077612620311264020323 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathClosePath_Wrapper: Magick::PathClosePath { Magick_PathClosePath_Wrapper(PyObject* py_self_): Magick::PathClosePath(), py_self(py_self_) {} PyObject* py_self; }; } void __PathClosePath() { class_< Magick::PathClosePath, boost::noncopyable, Magick_PathClosePath_Wrapper >("PathClosePath", init< >()) ; } pgmagick-0.6/src/_PathCurvetoAbs.cpp0000644000076500000240000000175312620346712020520 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathCurvetoAbs_Wrapper: Magick::PathCurvetoAbs { Magick_PathCurvetoAbs_Wrapper(PyObject* py_self_, const Magick::PathCurvetoArgs& p0): Magick::PathCurvetoAbs(p0), py_self(py_self_) {} Magick_PathCurvetoAbs_Wrapper(PyObject* py_self_, const Magick::PathCurveToArgsList& p0): Magick::PathCurvetoAbs(p0), py_self(py_self_) {} Magick_PathCurvetoAbs_Wrapper(PyObject* py_self_, const Magick::PathCurvetoAbs& p0): Magick::PathCurvetoAbs(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathCurvetoAbs() { class_< Magick::PathCurvetoAbs, bases, Magick_PathCurvetoAbs_Wrapper >("PathCurvetoAbs", init< const Magick::PathCurvetoArgs& >()) .def(init< const Magick::PathCurveToArgsList& >()) .def(init< const Magick::PathCurvetoAbs& >()) ; } pgmagick-0.6/src/_PathCurvetoArgs.cpp0000644000076500000240000000317512620311264020701 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; void __PathCurvetoArgs() { class_< Magick::PathCurvetoArgs >("PathCurvetoArgs", init< >()) .def(init< double, double, double, double, double, double >()) .def(init< const Magick::PathCurvetoArgs& >()) .def("x1", (void (Magick::PathCurvetoArgs::*)(double) )&Magick::PathCurvetoArgs::x1) .def("x1", (double (Magick::PathCurvetoArgs::*)() const)&Magick::PathCurvetoArgs::x1) .def("y1", (void (Magick::PathCurvetoArgs::*)(double) )&Magick::PathCurvetoArgs::y1) .def("y1", (double (Magick::PathCurvetoArgs::*)() const)&Magick::PathCurvetoArgs::y1) .def("x2", (void (Magick::PathCurvetoArgs::*)(double) )&Magick::PathCurvetoArgs::x2) .def("x2", (double (Magick::PathCurvetoArgs::*)() const)&Magick::PathCurvetoArgs::x2) .def("y2", (void (Magick::PathCurvetoArgs::*)(double) )&Magick::PathCurvetoArgs::y2) .def("y2", (double (Magick::PathCurvetoArgs::*)() const)&Magick::PathCurvetoArgs::y2) .def("x", (void (Magick::PathCurvetoArgs::*)(double) )&Magick::PathCurvetoArgs::x) .def("x", (double (Magick::PathCurvetoArgs::*)() const)&Magick::PathCurvetoArgs::x) .def("y", (void (Magick::PathCurvetoArgs::*)(double) )&Magick::PathCurvetoArgs::y) .def("y", (double (Magick::PathCurvetoArgs::*)() const)&Magick::PathCurvetoArgs::y) .def( self <= self ) .def( self < self ) .def( self >= self ) .def( self != self ) .def( self > self ) .def( self == self ) ; } pgmagick-0.6/src/_PathCurvetoRel.cpp0000644000076500000240000000175312620346712020535 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathCurvetoRel_Wrapper: Magick::PathCurvetoRel { Magick_PathCurvetoRel_Wrapper(PyObject* py_self_, const Magick::PathCurvetoArgs& p0): Magick::PathCurvetoRel(p0), py_self(py_self_) {} Magick_PathCurvetoRel_Wrapper(PyObject* py_self_, const Magick::PathCurveToArgsList& p0): Magick::PathCurvetoRel(p0), py_self(py_self_) {} Magick_PathCurvetoRel_Wrapper(PyObject* py_self_, const Magick::PathCurvetoRel& p0): Magick::PathCurvetoRel(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathCurvetoRel() { class_< Magick::PathCurvetoRel, bases, Magick_PathCurvetoRel_Wrapper >("PathCurvetoRel", init< const Magick::PathCurvetoArgs& >()) .def(init< const Magick::PathCurveToArgsList& >()) .def(init< const Magick::PathCurvetoRel& >()) ; } pgmagick-0.6/src/_PathLinetoAbs.cpp0000644000076500000240000000171112620346712020315 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathLinetoAbs_Wrapper: Magick::PathLinetoAbs { Magick_PathLinetoAbs_Wrapper(PyObject* py_self_, const Magick::Coordinate& p0): Magick::PathLinetoAbs(p0), py_self(py_self_) {} Magick_PathLinetoAbs_Wrapper(PyObject* py_self_, const Magick::CoordinateList& p0): Magick::PathLinetoAbs(p0), py_self(py_self_) {} Magick_PathLinetoAbs_Wrapper(PyObject* py_self_, const Magick::PathLinetoAbs& p0): Magick::PathLinetoAbs(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathLinetoAbs() { class_< Magick::PathLinetoAbs, bases, Magick_PathLinetoAbs_Wrapper >("PathLinetoAbs", init< const Magick::Coordinate& >()) .def(init< const Magick::CoordinateList& >()) .def(init< const Magick::PathLinetoAbs& >()) ; } pgmagick-0.6/src/_PathLinetoHorizontalAbs.cpp0000644000076500000240000000147012620337340022366 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathLinetoHorizontalAbs_Wrapper: Magick::PathLinetoHorizontalAbs { Magick_PathLinetoHorizontalAbs_Wrapper(PyObject* py_self_, double p0): Magick::PathLinetoHorizontalAbs(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathLinetoHorizontalAbs() { class_< Magick::PathLinetoHorizontalAbs, boost::noncopyable, Magick_PathLinetoHorizontalAbs_Wrapper >("PathLinetoHorizontalAbs", init< double >()) .def("x", (void (Magick::PathLinetoHorizontalAbs::*)(double) )&Magick::PathLinetoHorizontalAbs::x) .def("x", (double (Magick::PathLinetoHorizontalAbs::*)() const)&Magick::PathLinetoHorizontalAbs::x) ; } pgmagick-0.6/src/_PathLinetoHorizontalRel.cpp0000644000076500000240000000147012620311264022400 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathLinetoHorizontalRel_Wrapper: Magick::PathLinetoHorizontalRel { Magick_PathLinetoHorizontalRel_Wrapper(PyObject* py_self_, double p0): Magick::PathLinetoHorizontalRel(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathLinetoHorizontalRel() { class_< Magick::PathLinetoHorizontalRel, boost::noncopyable, Magick_PathLinetoHorizontalRel_Wrapper >("PathLinetoHorizontalRel", init< double >()) .def("x", (void (Magick::PathLinetoHorizontalRel::*)(double) )&Magick::PathLinetoHorizontalRel::x) .def("x", (double (Magick::PathLinetoHorizontalRel::*)() const)&Magick::PathLinetoHorizontalRel::x) ; } pgmagick-0.6/src/_PathLinetoRel.cpp0000644000076500000240000000171112620346712020332 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathLinetoRel_Wrapper: Magick::PathLinetoRel { Magick_PathLinetoRel_Wrapper(PyObject* py_self_, const Magick::Coordinate& p0): Magick::PathLinetoRel(p0), py_self(py_self_) {} Magick_PathLinetoRel_Wrapper(PyObject* py_self_, const Magick::CoordinateList& p0): Magick::PathLinetoRel(p0), py_self(py_self_) {} Magick_PathLinetoRel_Wrapper(PyObject* py_self_, const Magick::PathLinetoRel& p0): Magick::PathLinetoRel(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathLinetoRel() { class_< Magick::PathLinetoRel, bases, Magick_PathLinetoRel_Wrapper >("PathLinetoRel", init< const Magick::Coordinate& >()) .def(init< const Magick::CoordinateList& >()) .def(init< const Magick::PathLinetoRel& >()) ; } pgmagick-0.6/src/_PathLinetoVerticalAbs.cpp0000644000076500000240000000144012620311264022000 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathLinetoVerticalAbs_Wrapper: Magick::PathLinetoVerticalAbs { Magick_PathLinetoVerticalAbs_Wrapper(PyObject* py_self_, double p0): Magick::PathLinetoVerticalAbs(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathLinetoVerticalAbs() { class_< Magick::PathLinetoVerticalAbs, boost::noncopyable, Magick_PathLinetoVerticalAbs_Wrapper >("PathLinetoVerticalAbs", init< double >()) .def("y", (void (Magick::PathLinetoVerticalAbs::*)(double) )&Magick::PathLinetoVerticalAbs::y) .def("y", (double (Magick::PathLinetoVerticalAbs::*)() const)&Magick::PathLinetoVerticalAbs::y) ; } pgmagick-0.6/src/_PathLinetoVerticalRel.cpp0000644000076500000240000000144012620311264022015 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathLinetoVerticalRel_Wrapper: Magick::PathLinetoVerticalRel { Magick_PathLinetoVerticalRel_Wrapper(PyObject* py_self_, double p0): Magick::PathLinetoVerticalRel(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathLinetoVerticalRel() { class_< Magick::PathLinetoVerticalRel, boost::noncopyable, Magick_PathLinetoVerticalRel_Wrapper >("PathLinetoVerticalRel", init< double >()) .def("y", (void (Magick::PathLinetoVerticalRel::*)(double) )&Magick::PathLinetoVerticalRel::y) .def("y", (double (Magick::PathLinetoVerticalRel::*)() const)&Magick::PathLinetoVerticalRel::y) ; } pgmagick-0.6/src/_PathMovetoAbs.cpp0000644000076500000240000000171112620346712020334 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathMovetoAbs_Wrapper: Magick::PathMovetoAbs { Magick_PathMovetoAbs_Wrapper(PyObject* py_self_, const Magick::Coordinate& p0): Magick::PathMovetoAbs(p0), py_self(py_self_) {} Magick_PathMovetoAbs_Wrapper(PyObject* py_self_, const Magick::CoordinateList& p0): Magick::PathMovetoAbs(p0), py_self(py_self_) {} Magick_PathMovetoAbs_Wrapper(PyObject* py_self_, const Magick::PathMovetoAbs& p0): Magick::PathMovetoAbs(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathMovetoAbs() { class_< Magick::PathMovetoAbs, bases, Magick_PathMovetoAbs_Wrapper >("PathMovetoAbs", init< const Magick::Coordinate& >()) .def(init< const Magick::CoordinateList& >()) .def(init< const Magick::PathMovetoAbs& >()) ; } pgmagick-0.6/src/_PathMovetoRel.cpp0000644000076500000240000000171112620346712020351 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathMovetoRel_Wrapper: Magick::PathMovetoRel { Magick_PathMovetoRel_Wrapper(PyObject* py_self_, const Magick::Coordinate& p0): Magick::PathMovetoRel(p0), py_self(py_self_) {} Magick_PathMovetoRel_Wrapper(PyObject* py_self_, const Magick::CoordinateList& p0): Magick::PathMovetoRel(p0), py_self(py_self_) {} Magick_PathMovetoRel_Wrapper(PyObject* py_self_, const Magick::PathMovetoRel& p0): Magick::PathMovetoRel(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathMovetoRel() { class_< Magick::PathMovetoRel, bases, Magick_PathMovetoRel_Wrapper >("PathMovetoRel", init< const Magick::Coordinate& >()) .def(init< const Magick::CoordinateList& >()) .def(init< const Magick::PathMovetoRel& >()) ; } pgmagick-0.6/src/_PathQuadraticCurvetoAbs.cpp0000644000076500000240000000221512620346712022350 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathQuadraticCurvetoAbs_Wrapper: Magick::PathQuadraticCurvetoAbs { Magick_PathQuadraticCurvetoAbs_Wrapper(PyObject* py_self_, const Magick::PathQuadraticCurvetoArgs& p0): Magick::PathQuadraticCurvetoAbs(p0), py_self(py_self_) {} Magick_PathQuadraticCurvetoAbs_Wrapper(PyObject* py_self_, const Magick::PathQuadraticCurvetoArgsList& p0): Magick::PathQuadraticCurvetoAbs(p0), py_self(py_self_) {} Magick_PathQuadraticCurvetoAbs_Wrapper(PyObject* py_self_, const Magick::PathQuadraticCurvetoAbs& p0): Magick::PathQuadraticCurvetoAbs(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathQuadraticCurvetoAbs() { class_< Magick::PathQuadraticCurvetoAbs, bases, Magick_PathQuadraticCurvetoAbs_Wrapper >("PathQuadraticCurvetoAbs", init< const Magick::PathQuadraticCurvetoArgs& >()) .def(init< const Magick::PathQuadraticCurvetoArgsList& >()) .def(init< const Magick::PathQuadraticCurvetoAbs& >()) ; } pgmagick-0.6/src/_PathQuadraticCurvetoArgs.cpp0000644000076500000240000000265312620311264022537 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; void __PathQuadraticCurvetoArgs() { class_< Magick::PathQuadraticCurvetoArgs >("PathQuadraticCurvetoArgs", init< >()) .def(init< double, double, double, double >()) .def(init< const Magick::PathQuadraticCurvetoArgs& >()) .def("x1", (void (Magick::PathQuadraticCurvetoArgs::*)(double) )&Magick::PathQuadraticCurvetoArgs::x1) .def("x1", (double (Magick::PathQuadraticCurvetoArgs::*)() const)&Magick::PathQuadraticCurvetoArgs::x1) .def("y1", (void (Magick::PathQuadraticCurvetoArgs::*)(double) )&Magick::PathQuadraticCurvetoArgs::y1) .def("y1", (double (Magick::PathQuadraticCurvetoArgs::*)() const)&Magick::PathQuadraticCurvetoArgs::y1) .def("x", (void (Magick::PathQuadraticCurvetoArgs::*)(double) )&Magick::PathQuadraticCurvetoArgs::x) .def("x", (double (Magick::PathQuadraticCurvetoArgs::*)() const)&Magick::PathQuadraticCurvetoArgs::x) .def("y", (void (Magick::PathQuadraticCurvetoArgs::*)(double) )&Magick::PathQuadraticCurvetoArgs::y) .def("y", (double (Magick::PathQuadraticCurvetoArgs::*)() const)&Magick::PathQuadraticCurvetoArgs::y) .def( self < self ) .def( self > self ) .def( self != self ) .def( self == self ) .def( self <= self ) .def( self >= self ) ; } pgmagick-0.6/src/_PathQuadraticCurvetoRel.cpp0000644000076500000240000000221512620346712022365 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathQuadraticCurvetoRel_Wrapper: Magick::PathQuadraticCurvetoRel { Magick_PathQuadraticCurvetoRel_Wrapper(PyObject* py_self_, const Magick::PathQuadraticCurvetoArgs& p0): Magick::PathQuadraticCurvetoRel(p0), py_self(py_self_) {} Magick_PathQuadraticCurvetoRel_Wrapper(PyObject* py_self_, const Magick::PathQuadraticCurvetoArgsList& p0): Magick::PathQuadraticCurvetoRel(p0), py_self(py_self_) {} Magick_PathQuadraticCurvetoRel_Wrapper(PyObject* py_self_, const Magick::PathQuadraticCurvetoRel& p0): Magick::PathQuadraticCurvetoRel(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathQuadraticCurvetoRel() { class_< Magick::PathQuadraticCurvetoRel, bases, Magick_PathQuadraticCurvetoRel_Wrapper >("PathQuadraticCurvetoRel", init< const Magick::PathQuadraticCurvetoArgs& >()) .def(init< const Magick::PathQuadraticCurvetoArgsList& >()) .def(init< const Magick::PathQuadraticCurvetoRel& >()) ; } pgmagick-0.6/src/_PathSmoothCurvetoAbs.cpp0000644000076500000240000000205312620346712021704 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathSmoothCurvetoAbs_Wrapper: Magick::PathSmoothCurvetoAbs { Magick_PathSmoothCurvetoAbs_Wrapper(PyObject* py_self_, const Magick::Coordinate& p0): Magick::PathSmoothCurvetoAbs(p0), py_self(py_self_) {} Magick_PathSmoothCurvetoAbs_Wrapper(PyObject* py_self_, const Magick::CoordinateList& p0): Magick::PathSmoothCurvetoAbs(p0), py_self(py_self_) {} Magick_PathSmoothCurvetoAbs_Wrapper(PyObject* py_self_, const Magick::PathSmoothCurvetoAbs& p0): Magick::PathSmoothCurvetoAbs(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathSmoothCurvetoAbs() { class_< Magick::PathSmoothCurvetoAbs, bases, Magick_PathSmoothCurvetoAbs_Wrapper >("PathSmoothCurvetoAbs", init< const Magick::Coordinate& >()) .def(init< const Magick::CoordinateList& >()) .def(init< const Magick::PathSmoothCurvetoAbs& >()) ; } pgmagick-0.6/src/_PathSmoothCurvetoRel.cpp0000644000076500000240000000205312620346712021721 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathSmoothCurvetoRel_Wrapper: Magick::PathSmoothCurvetoRel { Magick_PathSmoothCurvetoRel_Wrapper(PyObject* py_self_, const Magick::Coordinate& p0): Magick::PathSmoothCurvetoRel(p0), py_self(py_self_) {} Magick_PathSmoothCurvetoRel_Wrapper(PyObject* py_self_, const Magick::CoordinateList& p0): Magick::PathSmoothCurvetoRel(p0), py_self(py_self_) {} Magick_PathSmoothCurvetoRel_Wrapper(PyObject* py_self_, const Magick::PathSmoothCurvetoRel& p0): Magick::PathSmoothCurvetoRel(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathSmoothCurvetoRel() { class_< Magick::PathSmoothCurvetoRel, bases, Magick_PathSmoothCurvetoRel_Wrapper >("PathSmoothCurvetoRel", init< const Magick::Coordinate& >()) .def(init< const Magick::CoordinateList& >()) .def(init< const Magick::PathSmoothCurvetoRel& >()) ; } pgmagick-0.6/src/_PathSmoothQuadraticCurvetoAbs.cpp0000644000076500000240000000225112620346712023542 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathSmoothQuadraticCurvetoAbs_Wrapper: Magick::PathSmoothQuadraticCurvetoAbs { Magick_PathSmoothQuadraticCurvetoAbs_Wrapper(PyObject* py_self_, const Magick::Coordinate& p0): Magick::PathSmoothQuadraticCurvetoAbs(p0), py_self(py_self_) {} Magick_PathSmoothQuadraticCurvetoAbs_Wrapper(PyObject* py_self_, const Magick::CoordinateList& p0): Magick::PathSmoothQuadraticCurvetoAbs(p0), py_self(py_self_) {} Magick_PathSmoothQuadraticCurvetoAbs_Wrapper(PyObject* py_self_, const Magick::PathSmoothQuadraticCurvetoAbs& p0): Magick::PathSmoothQuadraticCurvetoAbs(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathSmoothQuadraticCurvetoAbs() { class_< Magick::PathSmoothQuadraticCurvetoAbs, bases, Magick_PathSmoothQuadraticCurvetoAbs_Wrapper >("PathSmoothQuadraticCurvetoAbs", init< const Magick::Coordinate& >()) .def(init< const Magick::CoordinateList& >()) .def(init< const Magick::PathSmoothQuadraticCurvetoAbs& >()) ; } pgmagick-0.6/src/_PathSmoothQuadraticCurvetoRel.cpp0000644000076500000240000000225112620346712023557 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { struct Magick_PathSmoothQuadraticCurvetoRel_Wrapper: Magick::PathSmoothQuadraticCurvetoRel { Magick_PathSmoothQuadraticCurvetoRel_Wrapper(PyObject* py_self_, const Magick::Coordinate& p0): Magick::PathSmoothQuadraticCurvetoRel(p0), py_self(py_self_) {} Magick_PathSmoothQuadraticCurvetoRel_Wrapper(PyObject* py_self_, const Magick::CoordinateList& p0): Magick::PathSmoothQuadraticCurvetoRel(p0), py_self(py_self_) {} Magick_PathSmoothQuadraticCurvetoRel_Wrapper(PyObject* py_self_, const Magick::PathSmoothQuadraticCurvetoRel& p0): Magick::PathSmoothQuadraticCurvetoRel(p0), py_self(py_self_) {} PyObject* py_self; }; } void __PathSmoothQuadraticCurvetoRel() { class_< Magick::PathSmoothQuadraticCurvetoRel, bases, Magick_PathSmoothQuadraticCurvetoRel_Wrapper >("PathSmoothQuadraticCurvetoRel", init< const Magick::Coordinate& >()) .def(init< const Magick::CoordinateList& >()) .def(init< const Magick::PathSmoothQuadraticCurvetoRel& >()) ; } pgmagick-0.6/src/_Pixels.cpp0000644000076500000240000000067612620311264017067 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __Pixels() { class_< Magick::Pixels, boost::noncopyable >("Pixels", init< Magick::Image& >()) .def("sync", &Magick::Pixels::sync) .def("x", &Magick::Pixels::x) .def("y", &Magick::Pixels::y) .def("columns", &Magick::Pixels::columns) .def("rows", &Magick::Pixels::rows) ; } pgmagick-0.6/src/_QuantumOperator.cpp0000644000076500000240000000373712620311264020772 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __QuantumOperator() { #ifndef PGMAGICK_LIB_IMAGEMAGICK enum_< Magick::QuantumOperator >("QuantumOperator") .value("AddQuantumOp", Magick::AddQuantumOp) .value("AndQuantumOp", Magick::AndQuantumOp) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_x .value("AssignQuantumOp", Magick::AssignQuantumOp) #endif .value("DivideQuantumOp", Magick::DivideQuantumOp) .value("LShiftQuantumOp", Magick::LShiftQuantumOp) .value("MultiplyQuantumOp", Magick::MultiplyQuantumOp) .value("OrQuantumOp", Magick::OrQuantumOp) .value("RShiftQuantumOp", Magick::RShiftQuantumOp) .value("SubtractQuantumOp", Magick::SubtractQuantumOp) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_x .value("ThresholdQuantumOp", Magick::ThresholdQuantumOp) .value("ThresholdBlackQuantumOp", Magick::ThresholdBlackQuantumOp) .value("ThresholdWhiteQuantumOp", Magick::ThresholdWhiteQuantumOp) #endif .value("XorQuantumOp", Magick::XorQuantumOp) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_x .value("NoiseGaussianQuantumOp", Magick::NoiseGaussianQuantumOp) .value("NoiseImpulseQuantumOp", Magick::NoiseImpulseQuantumOp) .value("NoiseLaplacianQuantumOp", Magick::NoiseLaplacianQuantumOp) .value("NoiseMultiplicativeQuantumOp", Magick::NoiseMultiplicativeQuantumOp) .value("NoisePoissonQuantumOp", Magick::NoisePoissonQuantumOp) .value("NoiseUniformQuantumOp", Magick::NoiseUniformQuantumOp) .value("NegateQuantumOp", Magick::NegateQuantumOp) .value("GammaQuantumOp", Magick::GammaQuantumOp) .value("DepthQuantumOp", Magick::DepthQuantumOp) .value("LogQuantumOp", Magick::LogQuantumOp) .value("MaxQuantumOp", Magick::MaxQuantumOp) .value("MinQuantumOp", Magick::MinQuantumOp) .value("PowQuantumOp", Magick::PowQuantumOp) #endif #endif ; } pgmagick-0.6/src/_QuantumType.cpp0000644000076500000240000000220412620311264020104 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __QuantumType() { enum_< Magick::QuantumType >("QuantumType") .value("IndexQuantum", Magick::IndexQuantum) .value("GrayQuantum", Magick::GrayQuantum) .value("IndexAlphaQuantum", Magick::IndexAlphaQuantum) .value("GrayAlphaQuantum", Magick::GrayAlphaQuantum) .value("RedQuantum", Magick::RedQuantum) .value("CyanQuantum", Magick::CyanQuantum) .value("GreenQuantum", Magick::GreenQuantum) .value("YellowQuantum", Magick::YellowQuantum) .value("BlueQuantum", Magick::BlueQuantum) .value("MagentaQuantum", Magick::MagentaQuantum) .value("AlphaQuantum", Magick::AlphaQuantum) .value("BlackQuantum", Magick::BlackQuantum) .value("RGBQuantum", Magick::RGBQuantum) .value("RGBAQuantum", Magick::RGBAQuantum) .value("CMYKQuantum", Magick::CMYKQuantum) #ifdef PGMAGICK_LIB_GRAPHICSMAGICK_1_3_x .value("CIEYQuantum", Magick::CIEYQuantum) .value("CIEXYZQuantum", Magick::CIEXYZQuantum) #endif ; } pgmagick-0.6/src/_RenderingIntent.cpp0000644000076500000240000000077412620311264020721 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __RenderingIntent() { enum_< Magick::RenderingIntent >("RenderingIntent") .value("UndefinedIntent", Magick::UndefinedIntent) .value("SaturationIntent", Magick::SaturationIntent) .value("PerceptualIntent", Magick::PerceptualIntent) .value("AbsoluteIntent", Magick::AbsoluteIntent) .value("RelativeIntent", Magick::RelativeIntent) ; } pgmagick-0.6/src/_ResolutionType.cpp0000644000076500000240000000066712620311264020630 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __ResolutionType() { enum_< Magick::ResolutionType >("ResolutionType") .value("UndefinedResolution", Magick::UndefinedResolution) .value("PixelsPerInchResolution", Magick::PixelsPerInchResolution) .value("PixelsPerCentimeterResolution", Magick::PixelsPerCentimeterResolution) ; } pgmagick-0.6/src/_SparseColorMethod.cpp0000644000076500000240000000127512620311264021214 0ustar hattori-hstaff00000000000000#include #include using namespace boost::python; void __SparseColorMethod() { #ifdef PGMAGICK_LIB_IMAGEMAGICK enum_< Magick::SparseColorMethod >("SparseColorMethod") .value("UndefinedColorInterpolate", Magick::UndefinedColorInterpolate) .value("BarycentricColorInterpolate", Magick::BarycentricColorInterpolate) .value("BilinearColorInterpolate", Magick::BilinearColorInterpolate) .value("PolynomialColorInterpolate", Magick::PolynomialColorInterpolate) .value("ShepardsColorInterpolate", Magick::ShepardsColorInterpolate) .value("VoronoiColorInterpolate", Magick::VoronoiColorInterpolate) ; #endif } pgmagick-0.6/src/_STL.cpp0000644000076500000240000000754212620311264016264 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost::python; namespace { BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Magick_ImageList__writeImages_overloads_1_2, _writeImages, 1, 2) } class _ImageList { public: _ImageList(void); _ImageList(const std::string&); int _length(void); Magick::Image _get(const unsigned int); std::list::iterator _begin(void); std::list::iterator _end(void); void _append(Magick::Image); void _appendImages(Magick::Image*); void _coalesceImages(void); void _readImages(const std::string&); void _readImages(Magick::Blob&); void _writeImages(const std::string&, bool); void _writeImages(Magick::Blob*, bool); void _animationDelayImage(const unsigned int); void _scaleImage(const Magick::Geometry&); std::list::iterator _it; private: std::list _images; }; /* _ImageList class implementation */ _ImageList::_ImageList(void) { } _ImageList::_ImageList(const std::string &imageSpec) { Magick::readImages(&_images, imageSpec); } int _ImageList::_length(void) { return _images.size(); } Magick::Image _ImageList::_get(const unsigned int item_no) { std::list::iterator it = _images.begin(); std::advance(it, item_no); return *it; } std::list::iterator _ImageList::_begin(void) { return _images.begin(); } std::list::iterator _ImageList::_end(void) { return _images.end(); } void _ImageList::_append(Magick::Image _image) { _images.push_back(_image); } void _ImageList::_appendImages(Magick::Image *_image) { Magick::appendImages(_image, _images.begin(), _images.end()); } void _ImageList::_coalesceImages(void) { Magick::coalesceImages(&_images, _images.begin(), _images.end()); } void _ImageList::_readImages(const std::string &imageSpec) { Magick::readImages(&_images, imageSpec); } void _ImageList::_readImages(Magick::Blob &blob) { Magick::readImages(&_images, blob); } void _ImageList::_writeImages(const std::string &imageSpec, bool adjoin=true) { Magick::writeImages(_images.begin(), _images.end(), imageSpec, adjoin); } void _ImageList::_writeImages(Magick::Blob *blob, bool adjoin=true) { Magick::writeImages(_images.begin(), _images.end(), blob, adjoin); } void _ImageList::_animationDelayImage(const unsigned int delay) { for_each(_images.begin(), _images.end(), Magick::animationDelayImage(delay)); } void _ImageList::_scaleImage(const Magick::Geometry &geometry) { for_each(_images.begin(), _images.end(), Magick::scaleImage(geometry)); } void __STL() { class_< _ImageList >("ImageList", init< >()) .def("__len__", &_ImageList::_length) .def("__getitem__", (Magick::Image (_ImageList::*)(const unsigned int))&_ImageList::_get) .def("__iter__", range(&_ImageList::_begin, &_ImageList::_end)) .def("append", (void (_ImageList::*)(Magick::Image))&_ImageList::_append) .def("appendImages", (void (_ImageList::*)(Magick::Image*))&_ImageList::_appendImages) .def("coalesceImags", (void (_ImageList::*)(void))&_ImageList::_coalesceImages) .def("readImages", (void (_ImageList::*)(const std::string&))&_ImageList::_readImages) .def("readImages", (void (_ImageList::*)(Magick::Blob&))&_ImageList::_readImages) .def("writeImages", (void (_ImageList::*)(const std::string&, bool))&_ImageList::_writeImages, Magick_ImageList__writeImages_overloads_1_2()) .def("writeImages", (void (_ImageList::*)(Magick::Blob*, bool))&_ImageList::_writeImages, Magick_ImageList__writeImages_overloads_1_2()) .def("animationDelayImages", (void (_ImageList::*)(const unsigned int))&_ImageList::_animationDelayImage) .def("scaleImages", (void (_ImageList::*)(const Magick::Geometry&))&_ImageList::_scaleImage) ; } pgmagick-0.6/src/_StorageType.cpp0000644000076500000240000000070212620311264020057 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __StorageType() { enum_< Magick::StorageType >("StorageType") .value("CharPixel", Magick::CharPixel) .value("ShortPixel", Magick::ShortPixel) .value("IntegerPixel", Magick::IntegerPixel) .value("FloatPixel", Magick::FloatPixel) .value("DoublePixel", Magick::DoublePixel) ; } pgmagick-0.6/src/_StretchType.cpp0000644000076500000240000000151112620311264020066 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __StretchType() { enum_< Magick::StretchType >("StretchType") .value("NormalStretch", Magick::NormalStretch) .value("UltraCondensedStretch", Magick::UltraCondensedStretch) .value("ExtraCondensedStretch", Magick::ExtraCondensedStretch) .value("CondensedStretch", Magick::CondensedStretch) .value("SemiCondensedStretch", Magick::SemiCondensedStretch) .value("SemiExpandedStretch", Magick::SemiExpandedStretch) .value("ExpandedStretch", Magick::ExpandedStretch) .value("ExtraExpandedStretch", Magick::ExtraExpandedStretch) .value("UltraExpandedStretch", Magick::UltraExpandedStretch) .value("AnyStretch", Magick::AnyStretch) ; } pgmagick-0.6/src/_StyleType.cpp0000644000076500000240000000061312620311264017554 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __StyleType() { enum_< Magick::StyleType >("StyleType") .value("NormalStyle", Magick::NormalStyle) .value("ItalicStyle", Magick::ItalicStyle) .value("ObliqueStyle", Magick::ObliqueStyle) .value("AnyStyle", Magick::AnyStyle) ; } pgmagick-0.6/src/_TypeMetric.cpp0000644000076500000240000000103212620311264017673 0ustar hattori-hstaff00000000000000#include #include #include using namespace boost::python; void __TypeMetric() { class_< Magick::TypeMetric, boost::noncopyable >("TypeMetric", init< >()) .def("ascent", &Magick::TypeMetric::ascent) .def("descent", &Magick::TypeMetric::descent) .def("textWidth", &Magick::TypeMetric::textWidth) .def("textHeight", &Magick::TypeMetric::textHeight) .def("maxHorizontalAdvance", &Magick::TypeMetric::maxHorizontalAdvance) ; } pgmagick-0.6/src/_VirtualPixelMethod.cpp0000644000076500000240000000313312620311264021403 0ustar hattori-hstaff00000000000000#include #include using namespace boost::python; void __VirtualPixelMethod() { #ifdef PGMAGICK_LIB_IMAGEMAGICK enum_< Magick::VirtualPixelMethod >("VirtualPixelMethod") .value("UndefinedVirtualPixelMethod", Magick::UndefinedVirtualPixelMethod) .value("BackgroundVirtualPixelMethod", Magick::BackgroundVirtualPixelMethod) .value("DitherVirtualPixelMethod", Magick::DitherVirtualPixelMethod) .value("EdgeVirtualPixelMethod", Magick::EdgeVirtualPixelMethod) .value("MirrorVirtualPixelMethod", Magick::MirrorVirtualPixelMethod) .value("RandomVirtualPixelMethod", Magick::RandomVirtualPixelMethod) .value("TileVirtualPixelMethod", Magick::TileVirtualPixelMethod) .value("TransparentVirtualPixelMethod", Magick::TransparentVirtualPixelMethod) .value("MaskVirtualPixelMethod", Magick::MaskVirtualPixelMethod) .value("BlackVirtualPixelMethod", Magick::BlackVirtualPixelMethod) .value("GrayVirtualPixelMethod", Magick::GrayVirtualPixelMethod) .value("WhiteVirtualPixelMethod", Magick::WhiteVirtualPixelMethod) .value("HorizontalTileVirtualPixelMethod", Magick::HorizontalTileVirtualPixelMethod) .value("VerticalTileVirtualPixelMethod", Magick::VerticalTileVirtualPixelMethod) .value("HorizontalTileEdgeVirtualPixelMethod", Magick::HorizontalTileEdgeVirtualPixelMethod) .value("VerticalTileEdgeVirtualPixelMethod", Magick::VerticalTileEdgeVirtualPixelMethod) .value("CheckerTileVirtualPixelMethod", Magick::CheckerTileVirtualPixelMethod) ; #endif } pgmagick-0.6/src/_VPath.cpp0000644000076500000240000000121112620346712016635 0ustar hattori-hstaff00000000000000#include #include #include #include using namespace boost; using namespace boost::python; void __VPath() { implicitly_convertible< Magick::VPathBase, Magick::VPath >(); class_< Magick::VPathBase, noncopyable >("VPathBase", no_init) ; class_< Magick::VPath >("VPath", init< >()) .def(init< const Magick::VPathBase& >()) .def(init< const Magick::VPath& >()) .def( self == self ) .def( self != self ) .def( self > self ) .def( self < self ) .def( self >= self ) .def( self <= self ) ; } pgmagick-0.6/src/Makefile0000644000076500000240000000637712620311264016424 0ustar hattori-hstaff00000000000000CC = g++ FLAGS = -Wall INCS = -I/usr/include/python2.7 -I/usr/include/GraphicsMagick SO = _pgmagick.so LIBS = -lboost_python -lGraphicsMagick++ OBJS = _Blob.o \ _ChannelType.o \ _Color.o \ _ColorspaceType.o \ _CompositeOperator.o \ _CompressionType.o \ _Coordinate.o \ _DecorationType.o \ _DistortImageMethod.o \ _Drawable.o \ _DrawableAffine.o \ _DrawableArc.o \ _DrawableBezier.o \ _DrawableCircle.o \ _DrawableClipPath.o \ _DrawableColor.o \ _DrawableCompositeImage.o \ _DrawableDashArray.o \ _DrawableDashOffset.o \ _DrawableEllipse.o \ _DrawableFillColor.o \ _DrawableFillOpacity.o \ _DrawableFillRule.o \ _DrawableFont.o \ _DrawableGravity.o \ _DrawableLine.o \ _DrawableMatte.o \ _DrawableMiterLimit.o \ _DrawablePath.o \ _DrawablePoint.o \ _DrawablePointSize.o \ _DrawablePolygon.o \ _DrawablePolyline.o \ _DrawablePopClipPath.o \ _DrawablePopGraphicContext.o \ _DrawablePopPattern.o \ _DrawablePushClipPath.o \ _DrawablePushGraphicContext.o \ _DrawablePushPattern.o \ _DrawableRectangle.o \ _DrawableRotation.o \ _DrawableRoundRectangle.o \ _DrawableScaling.o \ _DrawableSkewX.o \ _DrawableSkewY.o \ _DrawableStrokeAntialias.o \ _DrawableStrokeColor.o \ _DrawableStrokeLineCap.o \ _DrawableStrokeLineJoin.o \ _DrawableStrokeOpacity.o \ _DrawableStrokeWidth.o \ _DrawableText.o \ _DrawableTextAntialias.o \ _DrawableTextDecoration.o \ _DrawableTextUnderColor.o \ _DrawableTranslation.o \ _DrawableViewbox.o \ _Exception.o \ _EndianType.o \ _FillRule.o \ _FilterTypes.o \ _Geometry.o \ _GravityType.o \ _Image.o \ _ImageType.o \ _InterlaceType.o \ _LineCap.o \ _LineJoin.o \ _Montage.o \ _NoiseType.o \ _OrientationType.o \ _PaintMethod.o \ _PathArcAbs.o \ _PathArcArgs.o \ _PathArcRel.o \ _PathClosePath.o \ _PathCurvetoAbs.o \ _PathCurvetoArgs.o \ _PathCurvetoRel.o \ _PathLinetoAbs.o \ _PathLinetoHorizontalAbs.o \ _PathLinetoHorizontalRel.o \ _PathLinetoRel.o \ _PathLinetoVerticalAbs.o \ _PathLinetoVerticalRel.o \ _PathMovetoAbs.o \ _PathMovetoRel.o \ _PathQuadraticCurvetoAbs.o \ _PathQuadraticCurvetoArgs.o \ _PathQuadraticCurvetoRel.o \ _PathSmoothCurvetoAbs.o \ _PathSmoothCurvetoRel.o \ _PathSmoothQuadraticCurvetoAbs.o \ _PathSmoothQuadraticCurvetoRel.o \ _Pixels.o \ _QuantumOperator.o \ _QuantumType.o \ _RenderingIntent.o \ _ResolutionType.o \ _SparseColorMethod.o \ _StorageType.o \ _StretchType.o \ _StyleType.o \ _STL.o \ _TypeMetric.o \ _VirtualPixelMethod.o \ _VPath.o \ _gminfo.o \ _main.o .SUFFIXES: .cpp .o $(SO): $(OBJS) $(CC) $(LIBS) -fPIC -shared -o $(SO) $^ .cpp.o: $(CC) $(FLAGS) $(INCS) -o $@ -c $< clean: rm -rf $(OBJS) $(SO) pgmagick-0.6/test/0000755000076500000240000000000012620347020015136 5ustar hattori-hstaff00000000000000pgmagick-0.6/test/test_cookbook.py0000644000076500000240000000644312620346712020373 0ustar hattori-hstaff00000000000000# coding: utf-8 import os.path import sys import unittest from pgmagick import api from pgmagick import Image, Geometry, Blob class TestCookbook(unittest.TestCase): def setUp(self): self.tmp_filename_jpg = "_cookbook_test.jpg" self.tmp_filename_png = "_cookbook_test.png" def tearDown(self): if os.path.exists(self.tmp_filename_jpg): os.remove(self.tmp_filename_jpg) if os.path.exists(self.tmp_filename_png): os.remove(self.tmp_filename_png) def test_red_background_jpeg_image(self): img = api.Image((300, 200), 'red') img.write(self.tmp_filename_jpg) def test_transparent_png_image(self): img = api.Image((300, 200), 'transparent') img.write(self.tmp_filename_png) def test_gradient_png_image(self): img = api.Image((300, 200), 'gradient:#ffffff-#000000') img.write(self.tmp_filename_png) def test_annotate(self): img = api.Image((300, 200)) if sys.platform.lower() == 'darwin': img.font("/Library/Fonts/Arial.ttf") img.annotate('Hello World') img.write(self.tmp_filename_png) def test_annotate_with_angle45(self): img = api.Image((300, 200)) if sys.platform.lower() == 'darwin': img.font("/Library/Fonts/Arial.ttf") img.annotate('Hello World', angle=45) img.write(self.tmp_filename_png) def test_annotate_with_japanese_font(self): img = api.Image((300, 200)) if sys.platform.lower() == 'darwin': img.font("/System/Library/Fonts/Hiragino Sans GB W3.ttc") else: # TODO: not support windows img.font("/usr/share/fonts/truetype/ttf-japanese-gothic.ttf") img.annotate('ようこそpgmagickへ!!') img.write(self.tmp_filename_png) def test_scale(self): img = api.Image((300, 200), 'blue') img.write(self.tmp_filename_png) img2 = api.Image(self.tmp_filename_png) img2.scale(0.5) img2.write(self.tmp_filename_png) self.assertEqual(img2.width, 150) self.assertEqual(img2.height, 100) def test_scale_with_lanczos(self): img = api.Image((300, 200), 'blue') img.write(self.tmp_filename_png) img2 = api.Image(self.tmp_filename_png) img2.scale((150, 100), 'lanczos') img2.write(self.tmp_filename_png) self.assertEqual(img2.width, 150) self.assertEqual(img2.height, 100) @unittest.skipIf(sys.version_info[0] == 3, "not support python3.x") def test_scale_jpeg(self): img = api.Image((400, 400), 'blue') img.write(self.tmp_filename_jpg) with open(self.tmp_filename_jpg, 'rb') as fp: b = Blob(str(fp.read())) img2 = Image(b, Geometry(200, 200)) if sys.platform.lower() == 'darwin': # NOTE: error occur when use '200x200' param # ----------------------------------------------------- # RuntimeError: Magick: Application transferred too few # scanlines (x.jpg) reported by coders/jpeg.c:344 (JPEGErrorHandler) img2.scale('199x199') else: img2.scale('200x200') img2.write(self.tmp_filename_jpg) if __name__ == '__main__': unittest.main() pgmagick-0.6/test/test_pgmagick_api.py0000644000076500000240000002733512620346712021203 0ustar hattori-hstaff00000000000000import unittest import sys sys.path.append('../') sys.path.append('./') import pgmagick from pgmagick.api import Image, Draw print(pgmagick.gminfo().version) libgm_version = [int(v) for v in pgmagick.gminfo().version.split('.')] class ImageTestCase(unittest.TestCase): def setUp(self): self.img = Image((600, 400), 'red') def test_unicodefilename(self): self.img.write('unicode.png') if sys.version_info >= (3, ): img = Image('unicode.png') else: img = Image(unicode('unicode.png')) img.scale(0.5) if sys.version_info >= (3, ): img.write('unicode.jpg') else: img.write(unicode('unicode.jpg')) def test_nonarg(self): Image() def test_arg(self): Image((600, 400), 'red') def test_arg_float(self): Image((600.5, 400.4), 'red') def test_blur(self): self.img.blur(2, 2.3) self.img.write('t.jpg') def test_blur_channel(self): self.img.blur_channel('cyan') self.img.write('t.jpg') def test_scale(self): im = Image((600, 400), 'red') im.scale(0.6) im.write('t.jpg') def test_composite_arg_list(self): base = Image((300, 200), 'green') layer = Image((300, 200), 'transparent') drawer = Draw() drawer.circle(50, 50, 50, 100) layer.draw(drawer) base.composite(layer, (10, 10), 'over') base.write('t.png') def test_composite_arg_gravity(self): base = Image((300, 200), 'green') layer = Image((150, 100), 'transparent') drawer = Draw() drawer.circle(50, 50, 20, 20) layer.draw(drawer) base.composite(layer, 'center', 'over') base.write('t.png') def test_crop(self): img = Image((300, 200), 'gradient:#ffff00-#00ffff') img.crop(20, 20, 50, 100) img.write('t.png') def test_fontpointsize(self): img = Image((300, 200), 'red') img.font_pointsize(60) self.assertEqual(60, img.font_pointsize()) self.assertEqual(float, type(img.font_pointsize())) img.annotate("hello", (100, 100)) img.write('t.png') def test_size_property(self): im = Image((500, 300), 'red') self.assertEqual(im.width, 500) self.assertEqual(im.height, 300) im.scale(0.5) self.assertEqual(im.width, 250) self.assertEqual(im.height, 150) class DrawTestCase(unittest.TestCase): def setUp(self): self.im = Image((600, 400), 'red') self.d = Draw() def test_affine(self): self.d.affine(10, 10, 20, 20, 40, 40) self.im.draw(self.d.drawer) self.im.write('t.jpg') def test_arc(self): self.d.arc(30, 30, 40, 40, 40, 40) self.im.draw(self.d.drawer) self.im.write('t.jpg') def test_bezier(self): points = ((30, 30), (50, 75), (200, 100)) self.d.bezier(points) self.im.draw(self.d.drawer) self.im.write('t.png') def test_circle(self): self.d.circle(40, 40, 50, 100) self.im.draw(self.d.drawer) self.im.write('t.png') def test_color(self): self.d.color(40, 40, 'point') self.im.draw(self.d.drawer) self.im.write('t.png') def test_composite(self): img1 = Image((20, 20), 'plasma:blue') self.d.composite(10, 10, 0, 0, img1) self.im.draw(self.d) self.im.write('t.png') def test_draw_for_draw_class(self): self.d.color(40, 40, 'point') self.d.circle(100, 100, 50, 100) self.im.draw(self.d) self.im.write('t.png') def test_ellipse(self): self.d.ellipse(150, 150, 120, 120, 0, 120) self.im.draw(self.d) self.im.write('t.png') def test_fill_color(self): self.d.fill_color('#f09060') self.d.ellipse(150, 150, 120, 120, 0, 120) self.im.draw(self.d) self.im.write('t.png') def test_fill_rule(self): self.d.fill_rule('evenodd') self.d.circle(150, 150, 50, 180) self.d.fill_rule('nonzero') self.d.circle(350, 150, 250, 180) self.im.draw(self.d.drawer) self.im.write('t.png') def test_fill_opacity(self): self.im = Image((600, 400), 'transparent') self.d.fill_color('red') self.d.fill_opacity(0.5) self.d.circle(150, 150, 50, 180) self.d.fill_color('green') self.d.fill_opacity(0.8) self.d.circle(160, 160, 50, 180) self.im.draw(self.d.drawer) self.im.write('t.png') def test_font_style_italic(self): self.d.font('vera.ttf', 'italic') self.d.text(30, 30, "hello pgmagick") self.im.draw(self.d) self.im.write('t.png') def test_font_style_oblique(self): self.d.font('vera.ttf', 'oblique') self.d.text(30, 30, "hello pgmagick") self.im.draw(self.d) self.im.write('t.png') def test_font_stretch_ultracondensed(self): self.d.font('vera.ttf', 'oblique', stretch='ultracondensed') self.d.text(30, 30, "hello pgmagick") self.im.draw(self.d) self.im.write('t.png') def test_font_stretch_extraexpanded(self): self.d.font('vera.ttf', 'oblique', stretch='extraexpanded') self.d.text(30, 30, "hello pgmagick") self.im.draw(self.d) self.im.write('t.png') def test_font_weight100(self): self.d.font('vera.ttf', weight=100) self.d.text(30, 30, "hello pgmagick") self.im.draw(self.d) self.im.write('t.png') def test_font_bold(self): self.d.font('vera.ttf', weight='bold') self.d.text(30, 30, "hello pgmagick") self.im.draw(self.d) self.im.write('t.png') def test_gravity(self): self.d.gravity('center') self.d.text(0, 0, "hello pgmagick") self.im.draw(self.d) self.im.write('t.png') def test_line(self): self.d.line(10, 10, 40, 200) self.im.draw(self.d) self.im.write('t.png') def test_matte(self): self.d.matte(30, 30, 'filltoborder') self.im.draw(self.d) self.im.write('t.png') def test_miterlimit(self): self.d.miterlimit(0) self.d.stroke_color('black') self.d.stroke_width(3) self.d.line(10, 200, 100, 10) self.d.line(100, 10, 210, 200) self.im.draw(self.d) self.d = Draw() self.d.miterlimit(18) self.d.stroke_color('black') self.d.stroke_width(3) self.d.stroke_opacity(0.5) self.d.fill_opacity(0.5) self.d.line(210, 200, 300, 10) self.d.line(300, 10, 410, 200) self.im.draw(self.d) self.im.write('t.png') def test_path(self): paths = ((40, 30),) self.d.path(paths) self.im.draw(self.d.drawer) self.im.write('t.png') def test_point(self): for i in range(50): self.d.point(i, i + 10) for i in range(50, 200, 2): self.d.point(i, i + 10) self.im.draw(self.d.drawer) self.im.write('t.png') def test_pointsize(self): self.d.pointsize(10) self.d.pointsize(30.) self.d.circle(150, 150, 50, 180) self.im.draw(self.d.drawer) self.im.write('t.png') def test_polygon(self): coordinate = ((10, 10), (20, 30), (40, 50)) self.d.polygon(coordinate) coordinate = [(100, 100), (150, 100), [150, 150], (100, 150)] self.d.polygon(coordinate) self.im.draw(self.d) self.im.write('t.png') def test_polyline(self): coordinate = ((10, 10), (20, 30), (40, 50)) self.d.polyline(coordinate) coordinate = [(100, 100), (150, 100), [150, 150], (100, 150)] self.d.polyline(coordinate) self.im.draw(self.d) self.im.write('t.png') def test_rectangle(self): self.d.rectangle(50, 50, 100, 100) self.im.draw(self.d) self.im.write('t.png') def test_rotation(self): self.d.rectangle(150, 150, 200, 200) self.d.rotation(40) self.im.draw(self.d) self.d = Draw() self.d.fill_opacity(0.8) self.d.rectangle(150, 150, 200, 200) self.d.rotation(20) self.im.draw(self.d) self.d = Draw() self.d.fill_opacity(0.6) self.d.rectangle(150, 150, 200, 200) self.im.draw(self.d) self.im.write('t.png') def test_round_rectangle(self): self.d.round_rectangle(200, 200, 30, 30, 15, 15) self.im.draw(self.d) self.im.write('t.png') def test_scaling(self): self.d.scaling(0.4, 0.4) self.d.circle(150, 150, 150, 200) self.im.draw(self.d) self.d = Draw() self.d.fill_opacity(0.6) self.d.circle(150, 150, 150, 200) self.im.draw(self.d) self.im.write('t.png') def test_skew(self): self.d = Draw() self.d.fill_opacity(0.6) self.d.circle(50, 50, 50, 100) self.im.draw(self.d) self.d = Draw() self.d.fill_opacity(0.6) self.d.circle(50, 50, 50, 100) self.d.skewx(40) self.im.draw(self.d) self.d = Draw() self.d.fill_opacity(0.6) self.d.circle(50, 50, 50, 100) self.d.skewy(40) self.im.draw(self.d) self.im.write('t.png') def test_stroke_antialias(self): self.d.stroke_color('black') self.d.stroke_width(20) self.d.stroke_antialias(True) self.d.line(10, 10, 40, 200) self.d.stroke_antialias(False) self.d.line(50, 10, 80, 200) self.im.draw(self.d) self.im.write('t.png') def test_stroke_linecap(self): self.d.stroke_color('lime') self.d.stroke_linecap('butt') self.d.stroke_linecap('round') self.d.stroke_linecap('square') self.d.line(10, 10, 40, 200) self.im.draw(self.d) self.im.write('t.png') @unittest.skipIf(libgm_version <= [1, 3, 12], "bug in gm version: %s" % str(libgm_version)) def test_stroke_linejoin(self): self.d.stroke_color('lime') self.d.stroke_linejoin('round') self.d.stroke_linejoin('bevel') self.d.stroke_linejoin('miter') self.d.line(10, 10, 40, 200) self.im.draw(self.d) self.im.write('t.png') def test_stroke_color(self): self.d.stroke_color('lime') self.d.line(10, 10, 40, 200) self.im.draw(self.d) self.im.write('t.png') def test_stroke_width(self): self.d.stroke_width(20) self.d.line(20, 20, 50, 210) self.im.draw(self.d) self.im.write('t.png') def test_text(self): self.d.text(30, 30, "hello pgmagick") self.im.draw(self.d) self.im.write('t.png') def test_text_antialias(self): self.d.font('courier', weight='bold') self.d.pointsize(70) self.d.text_antialias(False) self.d.text(30, 100, "hello pgmagick") self.d.text_antialias(True) self.d.text(30, 200, "hello pgmagick") self.im.draw(self.d) self.im.write('t.png') def test_text_decoration(self): self.d.pointsize(70) self.d.text_decoration('overline') self.d.text(30, 100, "hello pgmagick") self.d.text_decoration('linethrough') self.d.text(30, 200, "hello pgmagick") self.d.text_decoration('underline') self.d.text(30, 300, "hello pgmagick") self.im.draw(self.d) self.im.write('t.png') def test_text_undercolor(self): self.d.pointsize(70) self.d.text_undercolor('lime') self.d.text(30, 100, "hello pgmagick") self.im.draw(self.d) self.im.write('t.png') def test_translate(self): self.d.translate(10, 200) self.im.draw(self.d) self.im.write('t.png') unittest.main() pgmagick-0.6/test/test_pgmagick_blob.py0000644000076500000240000000012212620311264021323 0ustar hattori-hstaff00000000000000import sys sys.path.append('../') sys.path.append('./') from pgmagick import Blob pgmagick-0.6/test/test_pgmagick_color.py0000644000076500000240000000035312620311264021531 0ustar hattori-hstaff00000000000000import sys sys.path.append('../') sys.path.append('./') from pgmagick import Color from pgmagick import ColorHSL from pgmagick import ColorGray from pgmagick import ColorMono from pgmagick import ColorRGB from pgmagick import ColorYUV pgmagick-0.6/test/test_pgmagick_geometry.py0000644000076500000240000000012612620311264022244 0ustar hattori-hstaff00000000000000import sys sys.path.append('../') sys.path.append('./') from pgmagick import Geometry pgmagick-0.6/test/test_pgmagick_image.py0000644000076500000240000000614012620311264021475 0ustar hattori-hstaff00000000000000import sys import unittest import pgmagick from pgmagick import Blob, Image, Geometry, Color, LineJoin, StorageType from pgmagick import ChannelType from pgmagick import gminfo if gminfo.library == 'ImageMagick': from pgmagick import DistortImageMethod, SparseColorMethod class TestImage(unittest.TestCase): def test_noarg_init(self): im = Image() self.assertEqual(type(im), Image) def test_fromfile_init_error(self): self.assertRaises(RuntimeError, Image, "xXxX.jpg") def test_size_and_color_init(self): im = Image(Geometry(300, 200), Color('transparent')) size = im.size() self.assertEqual(300, size.width()) self.assertEqual(200, size.height()) def test_stroke_linejoin(self): im = Image(Geometry(300, 200), Color('transparent')) im.strokeLineJoin(LineJoin.MiterJoin) im.strokeLineJoin(LineJoin.RoundJoin) im.strokeLineJoin(LineJoin.BevelJoin) #def test_image_getpixels(self): # img = Image(Geometry(300, 200), Color('transparent')) # img.getPixels(10, 10, 10, 10) def test_image_init_storagetype(self): data = ["0" for i in range(10000)] img = Image(100, 100, "RGB", StorageType.CharPixel, "".join(data)) #def test_haldClut(self): # img = Image() # if hasattr(img, "haldClut"): # clutimg = Image(Geometry(400, 300), Color("transparent")) # clutimg.read("gradient:white-black") # img.haldClut(clutimg) class TestIMImage(unittest.TestCase): def setUp(self): self.img = Image() self.is_imagemagick = False if gminfo.library == 'ImageMagick': self.is_imagemagick = True def test_adaptiveBlur(self): if self.is_imagemagick: self.img.adaptiveBlur() def test_distort(self): if self.is_imagemagick: self.img.distort(DistortImageMethod.ScaleRotateTranslateDistortion, 1, 1.0, True) def test_extent(self): if self.is_imagemagick: self.img.extent(Geometry(100, 100)) def test_inverseFourierTransform(self): if self.is_imagemagick: phase = Image() self.img.inverseFourierTransform(phase) def test_sigmoidalContrast(self): if self.is_imagemagick: self.img.sigmoidalContrast(2, 2.) def test_splice(self): if self.is_imagemagick: self.img.splice(Geometry(100, 100)) def test_sparseColor(self): if self.is_imagemagick: self.img.sparseColor(ChannelType.RedChannel, SparseColorMethod.PolynomialColorInterpolate, 1, 1.) def test_sparseColor(self): if self.is_imagemagick: ret = self.img.exifProfile() self.assertEqual(type(ret), type(pgmagick._pgmagick.Blob())) def test_virtualPixelMethod(self): if self.is_imagemagick: ret = self.img.virtualPixelMethod() self.assertEqual(type(ret), type(pgmagick._pgmagick.VirtualPixelMethod())) unittest.main() pgmagick-0.6/test/test_pgmagick_imagelist.py0000644000076500000240000000032012620311264022363 0ustar hattori-hstaff00000000000000import unittest from pgmagick import ImageList class TestImageList(unittest.TestCase): def test_noarg(self): imgs = ImageList() self.assertEqual(type(imgs), ImageList) unittest.main() pgmagick-0.6/test/test_pgmagick_libinfo.py0000644000076500000240000000014212620311264022031 0ustar hattori-hstaff00000000000000from pgmagick import gminfo as info libinfo = info() print libinfo.version print libinfo.library pgmagick-0.6/test/test_pgmagick_montage.py0000644000076500000240000000012512620311264022042 0ustar hattori-hstaff00000000000000import sys sys.path.append('../') sys.path.append('./') from pgmagick import Montage