使用GWT画布处理图像

时间:2017-04-29 00:33:56

标签: java gwt

我有这段代码:

arr = [1, [2], [3, 4]];
arr.reduce(flatten, []); // [1, 2, 3, 4]

function flatten(a, b) {
    return a.concat(b);
}

此代码的问题是输出public static String scaleImage(ImageElement imageElement, String mime_type) { Canvas canvasTmp = Canvas.createIfSupported(); Context2d context = canvasTmp.getContext2d(); canvasTmp.setCoordinateSpaceWidth(imageElement.getWidth()); canvasTmp.setCoordinateSpaceHeight(imageElement.getHeight()); context.drawImage(imageElement, 0, 0, imageElement.getWidth(), imageElement.getHeight()); // How to set quality? String tempStr = canvasTmp.toDataUrl(mime_type); return tempStr; } String只是tempStr

0 个答案:

没有答案