Code Monkey home page Code Monkey logo

Comments (6)

tatarize avatar tatarize commented on August 20, 2024

Embroidermodder/Embroidermodder#106

from libembroidery.

tatarize avatar tatarize commented on August 20, 2024

Much of the Render stuff is done in QT. Pyembroidery does this by writing a quickie PNG writer directly.

https://github.com/EmbroidePy/pyembroidery/blob/master/pyembroidery/PngWriter.py

Which is probably the only way a suite like this should implement an output render like this. Doing anything else makes the interoperability considerably reduced since requiring the packages for QT rendering in libembroidery seems to be in error.

from libembroidery.

robin-swift avatar robin-swift commented on August 20, 2024

That file closes the gap somewhat (and it is what I meant by doing the render in libembroidery instead), can you open a pull request with that file so you get credited and I can hand translate it to C?

from libembroidery.

tatarize avatar tatarize commented on August 20, 2024

It's a bit of a tricky enterprise, not the bresenham line drawing algorithm but I don't know the C libraries or have coded any since college. Though the only really important part of that is zlib, which I'm sure has version kicking around but I wouldn't really know where it would be located. And there might be some that already write PNG in C.

I don't know that a dependency to libpng would be unacceptable.


I'm not too worried about credit. As you've seemed to be getting this project moving again, I'm following your work here, and I'm an expert with regard to embroidery formats. I'm sure we'll be seeing a lot of each other. C just isn't a language I know much at all, though it is the grand-daddy of half a dozen I can and do write. I wrote and maintain the Python and Java descendants of this code.

from libembroidery.

robin-swift avatar robin-swift commented on August 20, 2024

Okay, well I'll just use this as a reference then.

As for the libraries, I'm planning to have libembroidery work on a generic EmbImage structure and the caller is responsible for converting it to a format. The embroider CLI tool will just spit out a ppm since I can then use imagemagick convert to get to other formats.

from libembroidery.

tatarize avatar tatarize commented on August 20, 2024

There are a couple built in images that matter within embroidery formats. For example PEC block of PES files includes little graphics that can are embedded in the file, these are 1 bit graphics on a bit level and in the pes writer in libembroidery it does a trick where it takes needle penetrations and shrinks them down very tiny and uses that to generate the image.

I have seen one example of a program that takes these graphics and ran it through a genuine dithering algorithm to show the representative image, and it looked great. I think .SEW images also have a large set of raw bit images in them too. These tend to actually get displayed on the embroidery machine itself. Including the default built in blanks, the outline of the frame there is shown on screen.

I'm not sure how much effort I'd put into this stuff, but they are, at times relevant. I built the reader into for that into pyembroidery and I think embroidepy uses it. pip install embroidepy and then embroidepy -g <file>.pes displays some of those graphics. I recall Josh wrote me a .exe file that spat out the .pngs from the pes files and it was a huge help in making sure I got the graphics locations right.

from libembroidery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.