pngtext 0.2.0
Hides data inside png images
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
pngtext
A steganography tool to store text or other data inside PNG images.
Getting Started
Follow these instructions to build pngtext. These instructions guide on how to build pngtext as a program, but it can also be used as a library.
Prerequisites
You need to have these installed on you machine to build pngtext:
- the
dub
package manager - a dlang compiler.
dmd
works - an internet connection for
dub
to fetch the dependencies
Building
Run these commands to build pngtext:
dub fetch pngtext
dub build pngtext -c=app
If the build is succesful, the built binary will be in ~/.dub/packages/pngtext-*/pngtext/
Copy the binary to a path where the shell can find it (could be /usr/local/bin
).
Running Tests
To run the unittests on pngtext run:
dub test pngtext
Using
This describes how to use pngtext.
Writing Data to PNG Image
Text Editor
pngtext comes with a built in simple terminal based text editor. To edit hidden text in a png image, run this:
pngtext path/to/pngImage.png
or:
pngtext editor -i path/to/pngImage.png
Commmands
Aside from text editor, you can also write other types of data using write
command:
The following command will read
data from stdin and encode it in pngFile.png
, and write resulting image to outputPngFile.png
:
pngtext write -i pngFile.png -o outputPngFile.png
To read the data from a file, use the --file
or -f
option:
pngtext write -i pngFile.png -o outputPngFile.png -f fileContainingData
Reading Data from PNG Image
To read data, that was written using pngtext, use the read
command:
pngtext read -i pngFile.png
To read the stored data into a file, use the --output
or -o
option to specify the output file:
pngtext read -i pngFile.png -o outputDataFile
Calculating Maximum Data Capacity from PNG Image
To calculate exactly how many bytes a png image will be able to store, use the size
command:
pngtext size -i pngFile.png [-q QUALITY]
This will write the number of bytes pngFile.png
can hold if all pixels are used.
Values for -q
option are below:
1
- highest quality - 4 bits per pixel - 12.5% loss2
- high quality - 8 bits per pixel - 25% loss3
- low quality - 16 bits per pixel - 50% loss4
- zero quality - 32 bits per pixel - 100% loss
- Registered by Nafees Hassan
- 0.2.0 released 4 years ago
- nafees10/pngtext
- MIT
- Copyright © 2018-2019, Nafees
- Authors:
- Dependencies:
- utils, qui
- Versions:
-
1.0.1 2020-Dec-06 1.0.0 2020-Nov-30 0.3.0 2020-Jul-09 0.2.2 2020-Jan-10 0.2.1 2020-Jan-07 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
40 downloads total
-
- Score:
- 0.8
- Short URL:
- pngtext.dub.pm