<img align="center" height="60" src="priv/logo.svg"> KritaEx
View SourceA module for extracting embedded images from Krita .kra files
Installation
This package can be installed
by adding krita_ex
to your list of dependencies in mix.exs
:
def deps do
[
{:krita_ex, "~> 0.1.1"}
]
end
Usage
iex(1)> KritaEx.extract_png("test/files/test.kra", "tmp/output.png")
:ok
iex(1)> KritaEx.read_png("test/files/test.kra")
{:ok,
<<137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 64, 0,
0, 0, 64, 8, 6, 0, 0, 0, 170, 105, 113, 222, 0, 0, 0, 9, 112, 72, 89, 115, 0,
0, 46, 35, 0, 0, 46, ...>>}
iex(1)> KritaEx.valid_kra?("test/files/test.kra")
true
iex(2)> KritaEx.valid_kra?("test/files/invalid.kra")
false