【问题标题】:what to input in html2image google api in imageGenerator.setSize(Dimension dimension)在 imageGenerator.setSize(维度维度)中的 html2image google api 中输入什么
【发布时间】:2020-11-10 14:55:56
【问题描述】:

imageGenerator.setSize(尺寸);

在维度参数中输入什么, 我试过 imageGenerator.setSize(1024,1024) 但它不正确。

我也想提高画质,怎么做? Reference to the api

【问题讨论】:

  • 我尝试重新整理帖子

标签: java html image api google-api


【解决方案1】:

为什么不给函数它需要的东西?

new Dimension(1024, 1024);

类似:

imageGenerator.setSize(new Dimension(1024, 1024));

【讨论】:

  • 耶!图像已生成,但不完全是我想要的大小,无论您给出什么尺寸,它都会生成相同的图像。就像在纸上粘贴了一些小图像。如何从生成的图像中裁剪白色背景?
  • 您的第一个问题已得到解答。也许您可以使用更多代码发布第二个问题。在 cmets 中添加链接以允许我关注
猜你喜欢
  • 2018-01-05
  • 2018-02-10
  • 2020-03-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多