View Issue Details

IDProjectCategoryView StatusLast Update
0002259ScribusGraphics / Image Framespublic2006-09-05 01:56
ReporterringercAssigned Tofschmid  
PrioritylowSeverityfeatureReproducibilityalways
Status assignedResolutionopen 
Platformx86 LinuxOSFedora CoreOS Version3
Product Version1.3 
Summary0002259: Use transparency threshold for contour line
DescriptionFor images that support transparency, it might be interesting to optionally use the line around the non-transparent part of the image to be the contour line - essentially auto-tracing the image.
TagsNo tags attached.
Patch

Activities

ringerc

2005-07-17 17:37

reporter   ~0005624

This could also work with formats that don't support transparency, by letting the user set a mask colour. cbradney's colour picker would be good for that, though 90% of the time white would probably do the job.

thewormthatflies

2005-07-25 10:42

reporter   ~0005712

Seconded! An auto-trace algorithm would cut my work down by half. Most of the pictures I work with in Scribus are B&W line art which the text has to flow around, which means a lot of tedious fiddling with contour lines. It would be great if Scribus could at least give a reasonable estimate of an outline automatically.

It would also be nice if the user could tweak the behaviour of the auto-trace by:

- specifying a threshold for the amount of not-mask-colour that registers (to avoid noise and speckles; not that there should be too much noise in an image ready for print)

- specifying the preferred range of nodes (so that you get an outline you can actually work with, and not something which has a mess of thousands of nodes, which is what Open Office's auto trace tool gave me last time I tried it)

- specifying a margin (although a separate feature for growing/shrinking the outline may be better)

2006-09-03 01:13

 

imageclip-0.5.0.tar.gz (12,525 bytes)

bennygui

2006-09-03 01:14

reporter   ~0012403

I'm using version 1.3.3.3 and this doesn't seem implemented yet. So, I've made a plugin that can do that: it modifies the image frame to follow the edge of the image. It can generate a lot of curves/nodes but it does a good job most of the time. I've only tested it under Linux but it should work anywere. See the attached file "imageclip-0.5.0.tar.gz".

cbradney

2006-09-03 11:39

administrator   ~0012405

Benny, I haven't tried your code, but can you please state the license that your code is covered by? I read that some of the algorithms are free to use but what abot your code? It might be interesting to include this directly in the Scribus code base.

bennygui

2006-09-03 13:27

reporter   ~0012407

As stated in the headers of the files that I wrote (imageclip*), my code is distributed under the terms of the GNU General Public License v2... Since it's the same licence as Scribus, there should be no problem if it's included in the Scribus code base... I've made a plugin, but I'd be very happy if it can be included directly in Scribus. So, if the licence poses a problem, I'll see what I can do.

cbradney

2006-09-03 14:06

administrator   ~0012408

No that should be fine. We will reread the note frorm the algorithm author though. Thanks!

fschmid

2006-09-03 17:20

administrator   ~0012410

Have already tried out that code, thereby porting to our current 1.3.4cvs. Seems to work well. Have only noticed that it sometimes adds some incorrect points which are outside the image. And of course the GUI needs some improvements. The code for generating the outline is very interesting and i can imagine that it can be used in other places too. The whole plugin should go into the ScImage core code.

bennygui

2006-09-03 19:33

reporter   ~0012412

Well, the GUI is well... absent :). The code to find the edges of the image could be improved: for now, it only finds the edges from the top and the bottom, but it should also do the same thing from the left and the right... And a little bit of error checking to correct the points that could be outside the image could also be needed. But it shouldn't be hard to do...

fschmid

2006-09-04 17:15

administrator   ~0012433

Did some more tests today, the real tricky part is to get the first outline correct. Maybe we should look onto Autotrace or Potrace or even Krita?

fschmid

2006-09-04 17:28

administrator   ~0012434

Have a look at this: http://www.kdedevelopers.org/node/2295 maybe we can use that intelligent scissors tool to some degree.

ringerc

2006-09-05 01:54

reporter   ~0012438

The SIOX library might also be of use for a "user guided" auto-trace where the user draws a rough mask that the autotrace uses to improve its decisions. I saw it in use at LGM and it's pretty impressive, though not apparently production ready.

http://www.siox.org/

(the other place that library could be used is in image effects)

ringerc

2006-09-05 01:56

reporter   ~0012439

The GIMP and Inkscape screenshots of their SIOX support are ... impressive. Probably well worth looking into.

Issue History

Date Modified Username Field Change
2005-07-17 17:31 ringerc New Issue
2005-07-17 17:37 ringerc Note Added: 0005624
2005-07-25 10:42 thewormthatflies Note Added: 0005712
2006-02-07 21:52 plinnell Status new => acknowledged
2006-02-07 21:52 plinnell Product Version 1.3.1cvs => 1.3
2006-09-03 01:13 bennygui File Added: imageclip-0.5.0.tar.gz
2006-09-03 01:14 bennygui Note Added: 0012403
2006-09-03 11:39 cbradney Note Added: 0012405
2006-09-03 13:27 bennygui Note Added: 0012407
2006-09-03 14:06 cbradney Note Added: 0012408
2006-09-03 14:06 cbradney Status acknowledged => assigned
2006-09-03 14:06 cbradney Assigned To => fschmid
2006-09-03 17:20 fschmid Note Added: 0012410
2006-09-03 19:33 bennygui Note Added: 0012412
2006-09-04 17:15 fschmid Note Added: 0012433
2006-09-04 17:28 fschmid Note Added: 0012434
2006-09-05 01:54 ringerc Note Added: 0012438
2006-09-05 01:56 ringerc Note Added: 0012439
2015-09-17 20:10 Kunda Category Graphics / Image Frames => Graphics/Img Frames
2015-09-17 20:11 Kunda Category Graphics/Img Frames => Graphics / Image Frames