Tiled imported bitmap textures have errors, also exported

Bug #167900 reported by larpon on 2006-08-12
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
High
Unassigned

Bug Description

In inkscape 0.44 stable release...

When importing a bitmap, and make it a pattern (Alt+I).
And then using the pattern on an object (doesn't matter
what object).. Inkscape seems to tile the textures
wrong.. the tiled bitmap becomes visible and each tile
has tiny edges around them.. each edge is the same
size.. also when scaled. This occors most of the time..
but not always..
Sometimes the edges differs, depending on which zoom
level you're in.

If you convert the pattern back to an object and try
again. the edge is even bigger (after a few convertings
back and furth, the edges get even bigger)

The error is 100% reproducable on my two different distros:
Kubuntu Dapper and Gentoo.. both x86

To reproduce the error:

1) Import bitmap, and select it
2) Alt + I
3) make random vector object
4) set fill options for object as new pattern
- at this point it happens sometimes -
if not, then try to convert the pattern back to an
object (the previous imported bitmap)..
Now when selecting the bitmap again it has got a bigger
edge
(or you could say that the selection box surrounding it
has grown a bit).
to prove it, make it back to a pattern again..
and select this new pattern for your object...

This is 1 or 2 bugs.

Please see the attached file.

Output and edges can differ alot depending on your
objects current scale factor

larpon (larpon) wrote :
hash (hash-g) on 2007-12-08
Changed in inkscape:
status: New → Confirmed
admarginem (admarginem) wrote :

Yes, I can confirm this issue

pbhj (pbhj) wrote :

Yeah I saw this today too on Inkscape 0.45+devel (Mar 14 2008) with Kubuntu.

I noticed that if I export when I'm at a zoom level that doesn't show the "grid" or pattern elements then the export is fine. Quite strange, perhaps a rounding error?

sas (sas-sas) wrote :

The edges are an antialiasing artifact, a special case of bug 170356.

The edges getting bigger with successive conversions would be a different bug (although I can't reproduce it).

KevinM (kevbert1) wrote :

Hi. I'm using Ubuntu 7.10 on AMD64 and Inkscape 0.46. I've also seen this. Depending on the zoom the tiled patterns show either vertical and/or horizontal grid lines or no lines at all. I've even had an instance where only one line is displayed even though there are multiple tiles vertically and horizontally. I can send files if required.

Mark Duncan (eattheapple) wrote :

Using Ubuntu 8.10 and this bug still exists. I'm trying to design ID cards for my company and this has become a huge problem for me. Almost a show stopper (I'm seriously considering begging my boss for an Illustrator license right now because I'm pulling my hair out trying to get a simple pattern to display correctly). Seeing as how long this bug has been open, I shouldn't hold my breath on this getting fixed any time soon.

Inkscape devs, the new features you have added to Inkscape are awesome and I greatly appreciate all the hard work you have put in to it, but PLEASE go back and fix some of these bugs that have been around for a very long time. It shouldn't take over 2 years to fix a pattern rendering bug like this. If I knew a lot more about coding, I'd dig in and help.

prkos (prkos) wrote :

Until the bug gets fixed you can work around the problem by using tiled clones instead of patterns.

You can work around many bugs, usually there is more than one way of achieving things in Inkscape so not many are show stoppers.

Inkscape is being thoroughly refactored for 0.47, maybe after the refactoring things will look different for this bug. Remember that Inkscape is completely voluntary project, you can't push people what the should focus on. Also the situation might not be as simple as you think, maybe this bug depends on other bugs being solved first, sometimes the solution is known but the implementation is scheduled for some time in the future. Not all old bugs get solved, sometimes a new technology comes along and the bugs just disappear cos the old code gets discarded...

Anyway if you are considering buying Illustrator make sure it has the features you need (Illustrator is also not without bugs), although IMO it might be cheaper to hire a developer to solve this bug in Inkscape lol

IMHO your best bet is finding another way of drawing what you want, if you're stuck come to the inkscapeforum.com you'll get lots of help :)

KevinM (kevbert1) wrote :

Hi prkos, thanks for the reply. However I have an issue with tiled clones producing an unexpected offset (see bug #213793).

sgflt (launchpad-5-n1) wrote :

This bug is critical for me, as well. I'm trying to draw maps for a game, and being able to texture things seamlessly is very important in this case.

Crossing my fingers that this'll be fixed quickly.

Bruno Santos (bsantos) wrote :

I still see this with an up to date svn build. Trying to work around this by creating a bigger pattern with imagemagick montage, I got some crashes with too big patterns...

Ruud van Eeghem (r-van-eeghem) wrote :

Hi,

I recently stumbled on this bug also. I created a drawing and then transformed it using ALT+I to a rectangle + pattern. I then noticed that the pattern had some strange edges that I eventually identified as the pattern being repeated again.

I saw in the discussing above that the effect is described as an anti-aliasing effect. I disagree with this. I saw a similar effect when developing OpenGL/DirectX. It turned out to be a texture clamp effect due to the fact that the bounding box is slightly different in size then the texture. This typically occurs due to rounding errors. In OpenGL/DirectX the problem can be solved by explicitly defining the texture to be "clamped" meaning that it will be stretch to perfectly fit the bounding box.

I had a sample for this, but since the bug is already familiar, I guess it isn't needed. Some technical details:

Inkscape version:
    0.46+devel r21627, built Jun 19 2009
Platform:
    Windows XP, SP 2

su_v (suv-lp) wrote :

@Ruud - see also related Bug #165780 “Pattern Gaps”, especially the latest comment by Diederik <https://bugs.launchpad.net/inkscape/+bug/165780/comments/23> about this issue (#165780 is mainly about using svg patterns not imported bitmaps AFAIU)...

I'm not an expert or frequent user of patterns - if these are completely different issues, please just ignore this comment, otherwise your input could be an interesting hint for Diederik?

ScislaC (scislac) wrote :

No longer reproducible in trunk (assuming fixed by the cairo switch).

Changed in inkscape:
status: Confirmed → Fix Committed
assignee: nobody → Krzysztof Kosinski (tweenk)
milestone: none → 0.49
su_v (suv-lp) on 2012-07-20
tags: added: bitmap pattern renderer
removed: linux saving
Ryan Lerch (ryanlerch) wrote :

I am still hitting this one in a fairly recent trunk build (with bitmap patterns only)

With a vector pattern, there are no white gaps. i think this is the bug for vector patterns (https://bugs.launchpad.net/inkscape/+bug/165780)

Adding two attachements -- one is an SVG with a bitmap-pattern filled object. The other is a screenshot of it with the rendering issue.

This is on Fedora 20, with a recent trunk build ( r13283)

Ryan Lerch (ryanlerch) wrote :
Ryan Lerch (ryanlerch) wrote :

The bitmap i used in this example is a CC-BY-SA image from here:
http://subtlepatterns.com/congruent-pentagon-outline/

Ryan Lerch (ryanlerch) wrote :

Also, in the bitmaps settings i have in Inkcsape Preferences are:

Bitmap Link: Embed
Bitmap Scale: Smooth (optimizeQuality)
Default Import resolution: 90 DPI

Ryan Lerch (ryanlerch) wrote :

After chatting to su-v in #inkscape-devel i can now successfully get the bitmap pattern to render without the gaps by changing the imported Bitmaps's rendering mode to "Optimize Speed (blocky)" before converting it to a pattern.

Would a solution to this to be to convert all bitmap patterns to this rendering mode when they are converted to paths?

Also, it seems, that by default the bitmap patterns we ship have the Smooth Rendering enabled, so they show the gaps.

su_v (suv-lp) wrote :

Reopening, based on test case by Ryan Lerch.

Reproduced with recent trunk r13297 on OS X 10.7.5:
<https://www.dropbox.com/s/brwz9v6tg2emenr/167900-bitmap-pattern-screenshot-smooth-vs-blocky.png>

Changed in inkscape:
status: Fix Committed → Triaged
su_v (suv-lp) on 2014-11-06
Changed in inkscape:
milestone: 0.91 → 0.91.1
su_v (suv-lp) on 2015-09-30
Changed in inkscape:
milestone: 0.91.1 → 0.92
jazzynico (jazzynico) wrote :

I'm not sure we can convert a smoothed bitmap to a blocky one once imported in Inkscape.
Maybe we could add an help text (or tooltip) in the bitmap import dialog?

Changed in inkscape:
milestone: 0.92 → 0.92.1
milestone: 0.92.1 → 0.93
larpon (larpon) wrote :

Looks very much the same as I originally reported

This problem could easily be avoided if before making pattern from an image we switch rendering to OptimizeSpeed. It is located in Object Properties dialog.

Bryce Harrington (bryce) on 2017-02-09
Changed in inkscape:
assignee: Krzysztof Kosinski (tweenk) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers