Giter Club home page Giter Club logo

d7creader's Introduction

D7CReader

This is a small program used to explore the contents of STP files, which are used for knitting patterns, which I wrote out of curiosity as an answer to a stackexchange question (https://reverseengineering.stackexchange.com/questions/12235/reading-stp-designaknit-stitch-pattern-files-ii/12239#12239).

As .stp files are somewhat encrypted, it's not easily possible to read or convert them to anything else. The intention of this software is not to be used by end-users, rather, it shows how to read and decrypt those files. It is aimed at programmers who want to write their own STP decoder and want to see how it's done. If you want to write this kind of software in Java, feel free to use my classes, but beware that they come with no warranty of any kind.

The program will read three kinds of data from the .stp file:

  • stitch patterns
  • colors
  • stitch types

and dump them to standard output, as well as writing a .png image file to be able to see the pattern.

In the first part, each ascii character is a placeholder for a stitch in one certain color. This ascii map gives you a rough idea of the pattern. The second part maps those ascii characters to colors; the software will output a list of all color definitions, together with 4 numbers. The first of those, I don't really understand; the other three are hex RGB values. The third part is the stitch map, mapping positions to stitch types. I don't really know much about stitching so I can't tell which character is what type of stitch.

To run the program, import into your favourite IDE, compile, and run. Give the name of the stp file you want to decode on the command line; without any parameters, the name sterne.stp is assumed (which I used for testing).

If you have no idea of how to compile and use Java:

  • install a java SDK (Software Development Kit), the JRE (Java Runtime Environment) is not enough as it doesn't include a compiler.
  • Once installed, run javac src/de/guntram/D7C*java to compile the .java files to class files.
  • Run java -cp src de.guntram.D7CReader <filename.stp>
  • This will produce a <filename.png> image file which you can check out using any image viewer.
  • Repeat with other filenames to convert more files (you only need to compile once).

d7creader's People

Contributors

gbl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

t0mpr1c3 ca3rine

d7creader's Issues

Generate .stp file

Hello,

First, thanks for your awesome reverse-engineering!

I would like to generate a pattern and generate .stp file. Based on your experience, would it be difficult to adapt your code to be able to do that?

Thanks

Documentation missing

I could not find out how to use this program exactly. Please give a short description of features and usage. From the comments it looks like a command line interface that accepts an input file path as argument. I guess it has to be compiled with JDK and then can be run like this from the command line (cmd.exe on Windows)?:
d7creader "path\to\inputfile\filename.stp"

can it read .stp files for knitting machines or .pat files for knitting machines or both?
Thanks

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.