就像Ruby (RMagicK)中令人惊叹的“直方图”属性一样,它按照频率的顺序计算照片中的颜色列表--对于经典的ASP/.NET,有没有类似的第三方插件或组件的属性?
问候
发布于 2011-09-28 15:44:10
听起来好像RMagick是ImageMagick的衍生产品。Windows版本有一个允许您安装COM组件的安装程序。(要安装它,您必须在安装程序中选中它)。Link
这个COM组件可以从传统的ASP.
我有一些使用ImageMagick的经典ASP代码,语法有点不寻常。请注意,这不会单独起作用,因为它依赖于其他一些函数,但它会让你了解如何使用COM组件:
function DrawPoly(destFile, coordinates, fillcolor, strokecolor)
' Draws a single polygon and returns a result-image
Dim img: Set img = CreateObject("ImageMagickObject.MagickImage.1")
dim polygon, DrawCommand, DrawResult
polygon = trim(coordinates)
polygon = normalizeCoordinates(polygon,10)
DrawCommand = "polygon " & trim(polygon)
DrawResult = img.Convert(Server.Mappath(destFile), "-matte", "-fill", fillColor, "-stroke", strokeColor, "-draw", DrawCommand, Server.Mappath(destFile))
If Err.Number <> 0 Then Response.Write(Err.Number & ": " & Err.Description & vbCrLf & msgs)
DrawPoly = destFile
Set img = nothing
end function我不知道如何执行直方图,但我希望这段代码和imagemagick文档能让你做到这一点。
埃里克
https://stackoverflow.com/questions/7569652
复制相似问题