保存jsignature图像不再透明

时间:2019-03-16 20:45:22

标签: image coldfusion coldfusion-2016

如何将这个base64图像从jsignature保存到透明ping?我曾经能够成功保存具有透明背景的图像,现在仅能保存黑色背景。我不确定在最近两次ColdFusion或Java更新之一之后发生了什么。 (我正在运行Cold Fusion 2016更新10)图像数据通过表单字段和POST传递到local.signaturedata中。

<cfimage action="read" source="#imageReadBase64(local.signaturedata)#" name="local.imgCanvas"> <!--- png --->
<cfset ImageResize(local.imgCanvas,"",local.height)> <!--- png --->
<cfset local.bimg = imageGetBufferedImage(local.imgCanvas)>
<!--- RGB --->
<cfset local.rCS = createObject("java","java.awt.color.ColorSpace").CS_sRGB><!--- PROD: CS_sRGB, TEST: CS_LINEAR_RGB, TYPE_RGB, TYPE_INT_ARGB --->
<cfset local.rgb = createObject("java","java.awt.color.ColorSpace").getInstance(local.rCS)>

<cfset local.convert = createObject("java","java.awt.image.ColorConvertOp").init(local.rgb,javaCast("null",""))>

<cfset local.newImage = local.convert.filter(local.bimg, javaCast("null",""))>
<cfset local.imgCanvasConverted = imageNew(local.newImage)><!--- PROD: imageNew(local.newImage) --->

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXIAAABdCAYAAAC4qe1eAAANZ0lEQVR4Xu2de4xcZRnGn3emlG2gXOTWKLBnBcUAQqsVhEKgRNmZIbFF+EOMpCXGEGlQjBeMUS7BREQRSgEJwbQkhGgo0EaZs4VoCwgmBqFIScql7NmWUmyQS4m0ZbvnNd85O92dy9m57cyc851nkqZJ57u87+/59unZ73wXAT8kQAIkQAKJJiCJjp7BkwAJkAAJgEbOQUACJEACCSdAI0+4gAyfBEiABGjkHAMkQAIkkHACNPKEC8jwSYAESIBGzjFAAiRAAgknQCNPuIAMnwRIgARo5BwDJEACJJBwAjTyhAvI8EmABEiARs4xQAIkQAIJJ0AjT7iADJ8ESIAEaOQcAyRAAiSQcAI08oQLyPBJgARIgEbOMUACJEACCSdAI0+4gD0N33EdQBYDeiaAzdWxyBzAByBvV3zX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NLNOkh0NAac92NjPwcxxz6e/zj7N2xhBOsytm7BPCXApNu6qkf7AcAbue54fVBsUSyCHBqJVl6tR+t45rbghbVbUiwCyp/wdLBy2Oz1tzcWK+YB+ALdeMvL0ADbxIYiyeLAI08WXq1H214ScKGcDt65Nu/iX4Eo1C5C9Dl8PJe+wE02UJp6kT8q2rOe0/dHA28SdwsnkwCNPJk6tZe1IE5wmwYOrSphgTPQfVNQEzdSR+dA2TM0r63q9ur9d1U5UstyFyIHgvF/PBfoq6rL4sjfO0TvtS8H+i7hrsym1KYhRNKgEaeUOHaDju4+WbshQpDnvT+u4Gn9baDaKSBpuJYC+gqeAVeNt0IWpaxhgCN3BopW0jk+KHrIP6NE4dFNWWaLXTYkSovjr/AXMOn747wZaMJIEAjT4BIHQ0xnDO/BoD5U2OqJcrcpzL9Wt9N538SOgLIKgDmFMfuz9t3VBA2TgLNE6CRN8/Mzhqhod8M1SvLj3PttZFPOgNF5M9A9jqeC27nEGRWrROgkbfOzt6a4U5Qs0Z7iqNwO/FEXvNJ/sng6dvLmydwfkiABGoQoJFzWEQTMKtb1F8BSAEiZlnKpE8HjdzsvIT/GCRzNadOOEBJoD4BGnl9RixBAiRAArEmQCOPtTwMjgRIgATqE6CR12fEEiRAAiQQawI08ljLw+BIgARIoD4BGnl9RixBAiRAArEmQCOPtTwMjgRIgATqE6CR12fEEiRAAiQQawI08ljLw+BIgARIoD4BGnl9RixBAiRAArEmQCOPtTwMjgRIgATqE6CR12fEEiRAAiQQawI08ljLw+BIgARIoD4BGnl9RixBAiRAArEmQCOPtTwMjgRIgATqE/g/dbAvi6x3vvYAAAAASUVORK5CYII=

1 个答案:

答案 0 :(得分:2)

我们在更新版本发布后立即解决了此问题。我们可以与您共享补丁。您能否通过cf.install@adobe.com发送电子邮件。

谢谢, 普里扬克