Inkscape-与仅使用< image>相比,将rect与图像一起用作图案时的质量损失 [英] Inkscape - quality loss when using rect with image as pattern compared to just using <image>

查看:113
本文介绍了Inkscape-与仅使用< image>相比,将rect与图像一起用作图案时的质量损失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以基本上我使用两种不同版本的png图像.首先,只需在Inkscape中打开它并将其存储为svg,第二步是单击转换为模式",然后将其存储为svg.第一个在文件中看起来像这样:

So basically I use a png image in two different versions. First by just opening it in Inkscape and storing it as svg, for the second by clicking "convert to pattern" and then storing as svg. The first looks like this in the file:

 <image
 width="1280"
 height="720"
 preserveAspectRatio="none"
 xlink:href="data:image/png;base64,iVBOR..."
 id="image10"
 x="0"
 y="0" />

第二个是这样的

<defs
     id="defs6">
    <pattern
       patternUnits="userSpaceOnUse"
       width="1280"
       height="720"
       id="pattern4157">
      <image
         y="0"
         x="0"
         id="image10"
         xlink:href="data:image/png;base64,iVBOR..."
         preserveAspectRatio="none"
         height="720"
         width="1280" />
    </pattern>
  </defs>
  <sodipodi .../>
  <rect
     style="stroke:none;fill:url(#pattern4157)"
     width="1280"
     height="720"
     x="0"
     y="0"
     id="rect4160" />

现在,如果我使用inkscape将两个svg文件导出为png,则第一个与源png相同,第二个变得有点模糊,颜色似乎也有些暗,文件大小也从1.7缩小MB至1.3MB.为什么会这样?如何避免这种情况?

Now, if I export both svg files as png using inkscape, the first one is identical with the source png, the second one becomes a tiny bit blurry, the color also seems ever so slightly darker and also the filesize shrinks from 1.7MB to 1.3MB. Why does this happen? How can I avoid this?

推荐答案

这可能与图像的大小有关吗?您是否检查过第二次转换后两个文件的像素大小是否相同?

It might have to do with the size of the image? Did you check that both files after the second conversion were the same pixel size?

话虽这么说,我对使用针对矢量图形设计的Inkscape感到困惑,将基于像素的图像再次转换为针对矢量图形的格式.

That being said, it seems a bit strange to me that you would use Inkscape, which is designed for vectorial graphics, to mess around with converting pixel-based images into a format that is made for vectorial graphics again, and back.

这篇关于Inkscape-与仅使用&lt; image&gt;相比,将rect与图像一起用作图案时的质量损失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆