Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

I've noticed several design suggestions in your code.


computers / comp.misc / wanted: someone to reverse engineer a file format

SubjectAuthor
* wanted: someone to reverse engineer a file formatEli the Bearded
+* Re: wanted: someone to reverse engineer a file formatTheo
|`- Re: wanted: someone to reverse engineer a file formatEli the Bearded
`- Re: wanted: someone to reverse engineer a file format [kinda solved]Eli the Bearded

1
wanted: someone to reverse engineer a file format

<eli$2108080035@qaz.wtf>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=894&group=comp.misc#894

  copy link   Newsgroups: comp.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.panix5.panix.com!qz!not-for-mail
From: *@eli.users.panix.com (Eli the Bearded)
Newsgroups: comp.misc
Subject: wanted: someone to reverse engineer a file format
Date: Sun, 8 Aug 2021 04:58:46 -0000 (UTC)
Organization: Some absurd concept
Message-ID: <eli$2108080035@qaz.wtf>
Injection-Date: Sun, 8 Aug 2021 04:58:46 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="panix5.panix.com:166.84.1.5";
logging-data="473"; mail-complaints-to="abuse@panix.com"
User-Agent: Vectrex rn 2.1 (beta)
X-Liz: It's actually happened, the entire Internet is a massive game of Redcode
X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix
X-US-Congress: Moronic Fucks.
X-Attribution: EtB
XFrom: is a real address
Encrypted: double rot-13
 by: Eli the Bearded - Sun, 8 Aug 2021 04:58 UTC

While this is a serious request, in the sense I seriously want this,
it's more of old man shouts at cloud than an expectation that I'll
get a response.

Pixel Studio, available for at least Android and Iphones, and possibly
other platforms, has a native save format, called PSP (Pixel Studio
Project, most likely). I'd really like a way to turn PSP files into
something else, something standard, PNG, GIF, etc, from command line.
The format is JSON based, but the images seem to be encoded as the
incremental steps to produce the output, rather than a final image.

The author of Pixel Studio has created an importer for Unity, but Unity
is a fancy GUI game development tool, not a command line thing. And
the importer is closed source, so I can't reuse the code. I put a
request in for a command line tool but it was turned down.

Anyway, if you know some kid who wants to reverse engineer a image
file format, I'll by willing to throw a few bucks in the tip jar.

Elijah
------
Pixel Studio is a tool well suited for hand drawing GIFs

Re: wanted: someone to reverse engineer a file format

<T5h*6Z-qy@news.chiark.greenend.org.uk>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=898&group=comp.misc#898

  copy link   Newsgroups: comp.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!feeds.news.ox.ac.uk!news.ox.ac.uk!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED!not-for-mail
From: theom+news@chiark.greenend.org.uk (Theo)
Newsgroups: comp.misc
Subject: Re: wanted: someone to reverse engineer a file format
Date: 08 Aug 2021 16:10:33 +0100 (BST)
Organization: University of Cambridge, England
Lines: 14
Message-ID: <T5h*6Z-qy@news.chiark.greenend.org.uk>
References: <eli$2108080035@qaz.wtf>
NNTP-Posting-Host: chiark.greenend.org.uk
X-Trace: chiark.greenend.org.uk 1628435435 26064 212.13.197.229 (8 Aug 2021 15:10:35 GMT)
X-Complaints-To: abuse@chiark.greenend.org.uk
NNTP-Posting-Date: Sun, 8 Aug 2021 15:10:35 +0000 (UTC)
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/3.16.0-11-amd64 (x86_64))
Originator: theom@chiark.greenend.org.uk ([212.13.197.229])
 by: Theo - Sun, 8 Aug 2021 15:10 UTC

Eli the Bearded <*@eli.users.panix.com> wrote:
> While this is a serious request, in the sense I seriously want this,
> it's more of old man shouts at cloud than an expectation that I'll
> get a response.

Why not put some sample images on the web somewhere so people can take a
look? Perhaps with a corresponding screenshot or whatever so they know what
to expect? A collection of simple images would help understand how the
forward works.

It might be the format looks similar to something else - eg if they reused
some library to generate them.

Theo

Re: wanted: someone to reverse engineer a file format

<eli$2108081707@qaz.wtf>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=943&group=comp.misc#943

  copy link   Newsgroups: comp.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.panix5.panix.com!qz!not-for-mail
From: *@eli.users.panix.com (Eli the Bearded)
Newsgroups: comp.misc
Subject: Re: wanted: someone to reverse engineer a file format
Date: Sun, 8 Aug 2021 21:07:53 -0000 (UTC)
Organization: Some absurd concept
Message-ID: <eli$2108081707@qaz.wtf>
References: <eli$2108080035@qaz.wtf> <T5h*6Z-qy@news.chiark.greenend.org.uk>
Injection-Date: Sun, 8 Aug 2021 21:07:53 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="panix5.panix.com:166.84.1.5";
logging-data="5453"; mail-complaints-to="abuse@panix.com"
User-Agent: Vectrex rn 2.1 (beta)
X-Liz: It's actually happened, the entire Internet is a massive game of Redcode
X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix
X-US-Congress: Moronic Fucks.
X-Attribution: EtB
XFrom: is a real address
Encrypted: double rot-13
 by: Eli the Bearded - Sun, 8 Aug 2021 21:07 UTC

In comp.misc, Theo <theom+news@chiark.greenend.org.uk> wrote:
> Eli the Bearded <*@eli.users.panix.com> wrote:
> > While this is a serious request, in the sense I seriously want this,
> > it's more of old man shouts at cloud than an expectation that I'll
> > get a response.
>
> Why not put some sample images on the web somewhere so people can take a
> look? Perhaps with a corresponding screenshot or whatever so they know what
> to expect? A collection of simple images would help understand how the
> forward works.

Sure, but it looks particular to that tool to me. Five examples, three
files created by me, two from others. The first one, a 4x4 image was one
I made to try to first understand the file format. It disabused me of
the idea that the _snapshot array would be an easy shortcut to getting
the image from the JSON.

https://qaz.wtf/tmp/pixelstudio/

It looks like it would be easy if it were all "Tool":0, but as the other
examples show, it's not. Tool 0 seems to correspond to drawing single
pixels. These examples have Tool 0, Tool 3 (circle maker?), and some
others I don't know:

$ grep -ho "Tool[^,]*" *psp |sort |uniq -c | sort -nr
68 Tool\":3
31 Tool\":0
22 Tool\":10
9 Tool\":1
6 Tool\":20
5 Tool\":14
2 Tool\":6
2 Tool\":2
2 Tool\":16

(The history is json embeded in json, so backslashes galore.)

https://qaz.wtf/tmp/pixelstudio/

Elijah
------
Dr Monocle is a long running character of mine, based on a Lego minifig

Re: wanted: someone to reverse engineer a file format [kinda solved]

<eli$2108281730@qaz.wtf>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=1082&group=comp.misc#1082

  copy link   Newsgroups: comp.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.panix5.panix.com!qz!not-for-mail
From: *@eli.users.panix.com (Eli the Bearded)
Newsgroups: comp.misc
Subject: Re: wanted: someone to reverse engineer a file format [kinda solved]
Date: Sat, 28 Aug 2021 21:30:45 -0000 (UTC)
Organization: Some absurd concept
Message-ID: <eli$2108281730@qaz.wtf>
References: <eli$2108080035@qaz.wtf>
Injection-Date: Sat, 28 Aug 2021 21:30:45 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="panix5.panix.com:166.84.1.5";
logging-data="7325"; mail-complaints-to="abuse@panix.com"
User-Agent: Vectrex rn 2.1 (beta)
X-Liz: It's actually happened, the entire Internet is a massive game of Redcode
X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix
X-US-Congress: Moronic Fucks.
X-Attribution: EtB
XFrom: is a real address
Encrypted: double rot-13
 by: Eli the Bearded - Sat, 28 Aug 2021 21:30 UTC

In comp.misc, Eli the Bearded <*@eli.users.panix.com> wrote:
> Pixel Studio, available for at least Android and Iphones, and possibly
> other platforms, has a native save format, called PSP (Pixel Studio
> Project, most likely). I'd really like a way to turn PSP files into
> something else, something standard, PNG, GIF, etc, from command line.
> The format is JSON based, but the images seem to be encoded as the
> incremental steps to produce the output, rather than a final image.

I found a solution, of sorts. I still can't convert a Pixel Studio .psp
file into a PNG, GIF, etc, but I discovered that Pixel Studio has a
secret automatic conversion.

In order to get the preview in the file open command, the app uses a
JSON encoded "Gallery.cache" file. To grab the image "evil-flower.psp"
from the cache I can do this:

< "$HOME/storage/shared/DCIM/Pixel Studio/Gallery.cache" \
jq -c '.[] | {(.Path|sub(".*/";"")): .Texture }' |
grep '"evil-flower.psp": |
jp -r '.[]' |
base64 -d > evil-flower.png

I have a helper script to do that here:

https://qaz.wtf/netpbm/psp-preview

Since the cache above is the default location (it's where I have it),
the equivilent command line to the above would be:

psp-preview -p evil-flower.psp > evil-flower.png

Some things I learned along the way:

* the base64d built into jq is kinda useless. jq is not binary
safe, and expects everything to be UTF-8. PNG files are not
readable as UTF-8 files.

* this killed my original plan to extract all psp files from
the cache within a jq script

* the obvious ways to grep for a matching string within jq
itself return true or false instead of the matching lines,
so I gave up trying to get that to work and broke out grep

Elijah
------
expecting not many people will find this useful but still

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor