Age | Commit message (Collapse) | Author | Files | Lines |
|
Fixes crash bug found with the afl fuzzer.
Signed-off-by: Max Kellermann <max.kellermann@gmail.com>
|
|
Signed-off-by: Max Kellermann <max.kellermann@gmail.com>
|
|
Fixes crash when there are more than 256 blocks.
Signed-off-by: Max Kellermann <max.kellermann@gmail.com>
|
|
Fixes crash when the file's color table is too short.
Signed-off-by: Max Kellermann <max.kellermann@gmail.com>
|
|
Signed-off-by: Max Kellermann <max.kellermann@gmail.com>
|
|
Another case pointed out by Trever and missed in his first patch.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
I noticed that your thumbnailer shows jump stitches yielding some ugly
thread lines in some cases.
I have attached a patch which solves this problem. Feel free to use it,
modify it, whatever.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
This was just totally broken. Since we used to re-alloc the pes blocks,
we cannot maintain a list of them: the pointers change.
So stop realloc'ing the blocks, and instead just realloc the stitch
list. And simplify the list handling while at it.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
gnome3 changed the rules for how thumbnailer applications work. For the
better, but without any real documentation.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
This prevents a segfault for small embroidery patterns or large
output dimensions.
Even though output_png() is dead code, there is a slight chance,
that someone lacks libcairo-dev while being offline. ;-)
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
I like the default thin thread effect, but using a density of 2.5 or so
seems to be a bit more realistic on my test-case. Which may be more
about the test-case than anything else, but whatever.
So with this, you can do something like
pesconvert -d 2.5 -s 512 Jan_heartsdelight.pes s512.png
to generate a 512-pixel sized version of the Brother example file.
Making the "thread" thicker also meant that the line join matters a lot
more. A miter join (the cairo default) is not how thread works and
makes it all look very jagged. So make it use a round join instead.
The line cap could probably be a butt cap, but I set it to round too. I
doubt anybody will see any difference, since thread ends aren't common.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
I used to scale everything to be square. That was fine for testing, but
not so great for actual use. This makes it all look better when the
input isn't square. It also scales the width of the line properly.
And in honor of this actually being useful (it's installed on Tove's
machine now), let's sign off on it all.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Yeah, yeah, people who know how to do rpm's and autoconf think this is
ugly. Whatever.
|
|
|
|
.. not that the program actually conforms to the syntax I used, but
whatever. Maybe I'll get to it next.
|
|
XML? F*ck me with a ten-foot pole. But if I want the thumbnailer, I
apparently need this.
|
|
This leaves the actual pes-reading code in pes.c, and puts the
conversion logic in main.c.
I should add some argument parsing code so that it can specify
exactly what/how to convert things.
|
|
This is way better and simpler than the png one, since cairo can also
write png's, but makes the line drawing and thin lines all very easy.
This is still totally hardcoded, but it's starting to be useful! It
outputs the result as "out.png"
|
|
It's stupid because:
- it's fixed to output 128x128 png images (think preview icons)
- it doesn't actually draw lines, it just does them as dots at the endpoints
but it does kind of work.
|
|
Right now it just knows how to convert to SVG. Which isn't
all that interesting, but the parsing logic comes from
https://bugs.launchpad.net/inkscape/+bug/247463
which has a php script to do this, and it's all based on that.
|