Version 0.1

This commit is contained in:
ZAKS Web 2025-02-27 23:37:32 +02:00
parent f0c3eb86eb
commit dc49768def
35 changed files with 1406 additions and 0 deletions

BIN
_images/complete.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
_images/running.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
icons/ink-calc.xcf Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 891 B

BIN
icons/linux/ink-calc-16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
icons/linux/ink-calc-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
icons/linux/ink-calc-64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 891 B

BIN
icons/macos/ink-calc-16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
icons/macos/ink-calc-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
icons/macos/ink-calc-64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

BIN
icons/macos/ink-calc.icns Normal file

Binary file not shown.

Binary file not shown.

BIN
icons/windows/ink-calc.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

View File

@ -0,0 +1,279 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="100mm"
height="200mm"
viewBox="0 0 100 200"
version="1.1"
id="svg10612"
inkscape:export-filename="sample-gradient.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="sample-gradient.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview10614"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="1.3546667"
inkscape:cx="172.73622"
inkscape:cy="543.30709"
inkscape:window-width="1360"
inkscape:window-height="695"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs10609">
<linearGradient
inkscape:collect="always"
id="linearGradient11573">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop11569" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop11571" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient11567">
<stop
style="stop-color:#0000ff;stop-opacity:1;"
offset="0"
id="stop11563" />
<stop
style="stop-color:#0000ff;stop-opacity:0;"
offset="1"
id="stop11565" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient11561">
<stop
style="stop-color:#00ff00;stop-opacity:1;"
offset="0"
id="stop11557" />
<stop
style="stop-color:#00ff00;stop-opacity:0;"
offset="1"
id="stop11559" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient11555">
<stop
style="stop-color:#ff0000;stop-opacity:1;"
offset="0"
id="stop11551" />
<stop
style="stop-color:#ff0000;stop-opacity:0;"
offset="1"
id="stop11553" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient11252">
<stop
style="stop-color:#00ffff;stop-opacity:1;"
offset="0"
id="stop11248" />
<stop
style="stop-color:#00ffff;stop-opacity:0;"
offset="1"
id="stop11250" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient11246">
<stop
style="stop-color:#ffff00;stop-opacity:1;"
offset="0"
id="stop11242" />
<stop
style="stop-color:#ffff00;stop-opacity:0;"
offset="1"
id="stop11244" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient11194">
<stop
style="stop-color:#ff00ff;stop-opacity:1;"
offset="0"
id="stop11190" />
<stop
style="stop-color:#ff00ff;stop-opacity:0;"
offset="1"
id="stop11192" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient11132">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop11128" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop11130" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient11252"
id="linearGradient11134"
x1="-0.24999949"
y1="25"
x2="50.25"
y2="25"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient11194"
id="linearGradient11187"
gradientUnits="userSpaceOnUse"
x1="-0.24999949"
y1="25"
x2="50.25"
y2="25"
gradientTransform="translate(50.000001)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient11246"
id="linearGradient11216"
gradientUnits="userSpaceOnUse"
x1="-0.24999949"
y1="25"
x2="50.25"
y2="25"
gradientTransform="translate(0,50)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient11132"
id="linearGradient11239"
gradientUnits="userSpaceOnUse"
x1="-0.24999949"
y1="25"
x2="50.25"
y2="25"
gradientTransform="translate(50.000001,50.000001)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient11555"
id="linearGradient11134-2"
x1="-0.24999949"
y1="25"
x2="50.25"
y2="25"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(0,100)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient11561"
id="linearGradient11532"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(50.000001,100)"
x1="-0.24999949"
y1="25"
x2="50.25"
y2="25" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient11567"
id="linearGradient11534"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(0,150)"
x1="-0.24999949"
y1="25"
x2="50.25"
y2="25" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient11573"
id="linearGradient11536"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(50.000001,150)"
x1="-0.24999949"
y1="25"
x2="50.25"
y2="25" />
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:url(#linearGradient11134);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740"
width="50"
height="50"
x="0"
y="0" />
<rect
style="fill:url(#linearGradient11187);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-4"
width="50"
height="50"
x="50"
y="0" />
<rect
style="fill:url(#linearGradient11216);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-1"
width="50"
height="50"
x="0"
y="50" />
<rect
style="fill:url(#linearGradient11239);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7"
width="50"
height="50"
x="50"
y="50" />
<rect
style="fill:url(#linearGradient11134-2);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-9"
width="50"
height="50"
x="0"
y="100" />
<rect
style="fill:url(#linearGradient11532);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-4-0"
width="50"
height="50"
x="50"
y="100" />
<rect
style="fill:url(#linearGradient11534);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-1-9"
width="50"
height="50"
x="0"
y="150" />
<rect
style="fill:url(#linearGradient11536);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-1"
width="50"
height="50"
x="50"
y="150" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -0,0 +1,871 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="100mm"
height="100mm"
viewBox="0 0 100 100"
version="1.1"
id="svg10612"
inkscape:export-filename="sample-rbga-blends.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="sample-rgba-blends.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview10614"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="1.3546667"
inkscape:cx="188.97638"
inkscape:cy="188.97638"
inkscape:window-width="1360"
inkscape:window-height="695"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs10609">
<linearGradient
inkscape:collect="always"
id="linearGradient14128">
<stop
style="stop-color:#000000;stop-opacity:0.5;"
offset="0"
id="stop14124" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="0.49931982"
id="stop14126" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient14068">
<stop
style="stop-color:#ffff00;stop-opacity:0.5;"
offset="0"
id="stop14064" />
<stop
style="stop-color:#ffff00;stop-opacity:0;"
offset="0.49931982"
id="stop14066" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient14008">
<stop
style="stop-color:#ff00ff;stop-opacity:0.5;"
offset="0"
id="stop14004" />
<stop
style="stop-color:#ff00ff;stop-opacity:0;"
offset="0.49608621"
id="stop14006" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient13865">
<stop
style="stop-color:#0000ff;stop-opacity:1;"
offset="0"
id="stop13861" />
<stop
style="stop-color:#0000ff;stop-opacity:0;"
offset="0.49820441"
id="stop13863" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient13859">
<stop
style="stop-color:#00ffff;stop-opacity:0.500278;"
offset="0"
id="stop13855" />
<stop
style="stop-color:#00ffff;stop-opacity:0;"
offset="1"
id="stop13857" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient13853">
<stop
style="stop-color:#0000ff;stop-opacity:0.5;"
offset="0"
id="stop13849" />
<stop
style="stop-color:#0000ff;stop-opacity:0;"
offset="0.49913657"
id="stop13851" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient13642">
<stop
style="stop-color:#ff0000;stop-opacity:1;"
offset="0"
id="stop13638" />
<stop
style="stop-color:#ff0000;stop-opacity:0;"
offset="0.50032461"
id="stop13640" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient13636">
<stop
style="stop-color:#ff0000;stop-opacity:0.5;"
offset="0"
id="stop13632" />
<stop
style="stop-color:#ff0000;stop-opacity:0;"
offset="0.49913657"
id="stop13634" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient13630">
<stop
style="stop-color:#00ff00;stop-opacity:0.5;"
offset="0"
id="stop13626" />
<stop
style="stop-color:#00ff00;stop-opacity:0;"
offset="0.49767452"
id="stop13628" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient13489">
<stop
style="stop-color:#00ffff;stop-opacity:0.5;"
offset="0"
id="stop13485" />
<stop
style="stop-color:#00ffff;stop-opacity:0;"
offset="1"
id="stop13487" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient13483">
<stop
style="stop-color:#00ff00;stop-opacity:1;"
offset="0"
id="stop13479" />
<stop
style="stop-color:#00ff00;stop-opacity:0;"
offset="0.4972139"
id="stop13481" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient12836">
<stop
style="stop-color:#ff00ff;stop-opacity:0.5;"
offset="0"
id="stop12832" />
<stop
style="stop-color:#ff00ff;stop-opacity:0;"
offset="1"
id="stop12834" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient12696">
<stop
style="stop-color:#00ffff;stop-opacity:0.5;"
offset="0"
id="stop12692" />
<stop
style="stop-color:#00ffff;stop-opacity:0;"
offset="0.49931982"
id="stop12694" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient12688">
<stop
style="stop-color:#ffff00;stop-opacity:0.500278;"
offset="0"
id="stop12684" />
<stop
style="stop-color:#ffff00;stop-opacity:0;"
offset="1"
id="stop12686" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient12688"
id="linearGradient12690"
x1="0"
y1="75"
x2="50"
y2="75"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(0,-50)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient13636"
id="linearGradient12698"
x1="50"
y1="50"
x2="100"
y2="100"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-50,-50)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient12836"
id="linearGradient12829"
gradientUnits="userSpaceOnUse"
x1="0"
y1="75"
x2="50"
y2="75"
gradientTransform="translate(0,-100)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient12688"
id="linearGradient12915"
gradientUnits="userSpaceOnUse"
x1="0"
y1="75"
x2="50"
y2="75"
gradientTransform="translate(0,-50)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient12836"
id="linearGradient12917"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(0,-100)"
x1="0"
y1="75"
x2="50"
y2="75" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient13642"
id="linearGradient13046"
gradientUnits="userSpaceOnUse"
x1="50"
y1="50"
x2="100"
y2="100"
gradientTransform="translate(-50,-50)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient12696"
id="linearGradient13069"
gradientUnits="userSpaceOnUse"
x1="50"
y1="50"
x2="100"
y2="100" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient12688"
id="linearGradient13374"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(0,-150)"
x1="0"
y1="75"
x2="50"
y2="75" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient13489"
id="linearGradient13376"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-100,-100)"
x1="0"
y1="75"
x2="50"
y2="75" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient13630"
id="linearGradient13378"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-50,-150)"
x1="50"
y1="50"
x2="100"
y2="100" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient13483"
id="linearGradient13542"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-50,-150)"
x1="50"
y1="50"
x2="100"
y2="100" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient13489"
id="linearGradient13376-7"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-100,-100)"
x1="0"
y1="75"
x2="50"
y2="75" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient12688"
id="linearGradient13374-8"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(0,-150)"
x1="0"
y1="75"
x2="50"
y2="75" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient13865"
id="linearGradient13831"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-150,-50)"
x1="50"
y1="50"
x2="100"
y2="100" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient13859"
id="linearGradient13837"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-100,-50)"
x1="0"
y1="75"
x2="50"
y2="75" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient12836"
id="linearGradient13839"
gradientUnits="userSpaceOnUse"
x1="0"
y1="75"
x2="50"
y2="75" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient13853"
id="linearGradient13841"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-150,-50)"
x1="50"
y1="50"
x2="100"
y2="100" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient13859"
id="linearGradient13944"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-100,-50)"
x1="0"
y1="75"
x2="50"
y2="75" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient12836"
id="linearGradient13946"
gradientUnits="userSpaceOnUse"
x1="0"
y1="75"
x2="50"
y2="75" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient14008"
id="linearGradient14001"
gradientUnits="userSpaceOnUse"
x1="50"
y1="50"
x2="100"
y2="100"
gradientTransform="translate(0,-150)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient14068"
id="linearGradient14061"
gradientUnits="userSpaceOnUse"
x1="50"
y1="50"
x2="100"
y2="100"
gradientTransform="translate(-150)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient14128"
id="linearGradient14181"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-150,-150)"
x1="50"
y1="50"
x2="100"
y2="100" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient14068"
id="linearGradient14343"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-150)"
x1="50"
y1="50"
x2="100"
y2="100" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient14008"
id="linearGradient14428"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(0,-150)"
x1="50"
y1="50"
x2="100"
y2="100" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient12696"
id="linearGradient14482"
gradientUnits="userSpaceOnUse"
x1="50"
y1="50"
x2="100"
y2="100" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient12696"
id="linearGradient14505"
gradientUnits="userSpaceOnUse"
x1="50"
y1="50"
x2="100"
y2="100" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient12696"
id="linearGradient14528"
gradientUnits="userSpaceOnUse"
x1="50"
y1="50"
x2="100"
y2="100" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient14128"
id="linearGradient14582"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-150,-150)"
x1="50"
y1="50"
x2="100"
y2="100" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient14128"
id="linearGradient14636"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-150,-150)"
x1="50"
y1="50"
x2="100"
y2="100" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient13636"
id="linearGradient14794"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-50,-50)"
x1="50"
y1="50"
x2="100"
y2="100" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient13853"
id="linearGradient14848"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-150,-50)"
x1="50"
y1="50"
x2="100"
y2="100" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient13630"
id="linearGradient14902"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-50,-150)"
x1="50"
y1="50"
x2="100"
y2="100" />
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:url(#linearGradient13542);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-4-5"
width="50"
height="50"
x="-7.1054274e-15"
y="-100"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="rotate(90)" />
<rect
style="fill:url(#linearGradient14181);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-3-5-5"
width="50"
height="50"
x="-100"
y="-100"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="scale(-1)" />
<rect
style="fill:url(#linearGradient13046);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-0"
width="50"
height="50"
x="0"
y="0"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254" />
<rect
style="fill:url(#linearGradient12690);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-1"
width="50"
height="50"
x="-8.8817842e-16"
y="7.1054274e-15"
inkscape:export-filename="sample-yellow.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254" />
<rect
style="fill:url(#linearGradient12829);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-1-7"
width="50"
height="50"
x="7.1054274e-15"
y="-50"
inkscape:export-filename="sample-yellow.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="rotate(90)" />
<rect
style="fill:url(#linearGradient12915);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-1-6"
width="50"
height="50"
x="-8.8817842e-16"
y="7.1054274e-15"
inkscape:export-filename="sample-yellow.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254" />
<rect
style="fill:url(#linearGradient12917);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-1-7-5"
width="50"
height="50"
x="7.1054274e-15"
y="-50"
inkscape:export-filename="sample-yellow.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="rotate(90)" />
<rect
style="fill:url(#linearGradient12698);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7"
width="50"
height="50"
x="7.1054274e-15"
y="7.1054274e-15"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254" />
<rect
style="fill:url(#linearGradient14794);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-5"
width="50"
height="50"
x="7.1054274e-15"
y="7.1054274e-15"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254" />
<rect
style="fill:url(#linearGradient13831);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-0-4"
width="50"
height="50"
x="-100"
y="0"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="rotate(-90)" />
<rect
style="fill:url(#linearGradient13837);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-1-6-38"
width="50"
height="50"
x="-100"
y="-4.1448326e-16"
inkscape:export-filename="sample-yellow.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="rotate(-90)" />
<rect
style="fill:url(#linearGradient13839);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-1-7-5-6"
width="50"
height="50"
x="-4.1448326e-16"
y="50"
inkscape:export-filename="sample-yellow.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254" />
<rect
style="fill:url(#linearGradient13944);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-1-6-38-7"
width="50"
height="50"
x="-100"
y="-4.1448326e-16"
inkscape:export-filename="sample-yellow.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="rotate(-90)" />
<rect
style="fill:url(#linearGradient13946);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-1-7-5-6-7"
width="50"
height="50"
x="-4.1448326e-16"
y="50"
inkscape:export-filename="sample-yellow.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254" />
<rect
style="fill:url(#linearGradient13841);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-04"
width="50"
height="50"
x="-100"
y="7.1054274e-15"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="rotate(-90)" />
<rect
style="fill:url(#linearGradient14848);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-04-4"
width="50"
height="50"
x="-100"
y="7.1054274e-15"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="rotate(-90)" />
<rect
style="fill:url(#linearGradient13374);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-1-6-3"
width="50"
height="50"
x="7.1054274e-15"
y="-100"
inkscape:export-filename="sample-yellow.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="rotate(90)" />
<rect
style="fill:url(#linearGradient13376);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-1-7-5-0"
width="50"
height="50"
x="-100"
y="-50"
inkscape:export-filename="sample-yellow.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="scale(-1)" />
<rect
style="fill:url(#linearGradient13374-8);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-1-6-3-7"
width="50"
height="50"
x="7.1054274e-15"
y="-100"
inkscape:export-filename="sample-yellow.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="rotate(90)" />
<rect
style="fill:url(#linearGradient13376-7);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-1-7-5-0-5"
width="50"
height="50"
x="-100"
y="-50"
inkscape:export-filename="sample-yellow.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="scale(-1)" />
<rect
style="fill:url(#linearGradient13069);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-3"
width="50"
height="50"
x="50"
y="50"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254" />
<rect
style="fill:url(#linearGradient13378);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-4"
width="50"
height="50"
x="7.1054274e-15"
y="-100"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="rotate(90)" />
<rect
style="fill:url(#linearGradient14902);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-4-58"
width="50"
height="50"
x="7.1054274e-15"
y="-100"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="rotate(90)" />
<rect
style="fill:url(#linearGradient14061);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-3-0"
width="50"
height="50"
x="-100"
y="50"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="rotate(-90)" />
<rect
style="fill:url(#linearGradient14001);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-3-3"
width="50"
height="50"
x="50"
y="-100"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="rotate(90)" />
<rect
style="fill:url(#linearGradient14482);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-3-8"
width="50"
height="50"
x="50"
y="50"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254" />
<rect
style="fill:url(#linearGradient14505);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-3-6"
width="50"
height="50"
x="50"
y="50"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254" />
<rect
style="fill:url(#linearGradient14528);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-3-2"
width="50"
height="50"
x="50"
y="50"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254" />
<rect
style="fill:url(#linearGradient14343);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-3-0-7"
width="50"
height="50"
x="-100"
y="50"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="rotate(-90)" />
<rect
style="fill:url(#linearGradient14428);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-3-3-8"
width="50"
height="50"
x="50"
y="-100"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="rotate(90)" />
<rect
style="fill:url(#linearGradient14582);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-3-5"
width="50"
height="50"
x="-100"
y="-100"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="scale(-1)" />
<rect
style="fill:url(#linearGradient14636);fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-3-5-1"
width="50"
height="50"
x="-100"
y="-100"
inkscape:export-filename="sample-black.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
transform="scale(-1)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="100mm"
height="200mm"
viewBox="0 0 100 200"
version="1.1"
id="svg10612"
inkscape:export-filename="sample-solid.png"
inkscape:export-xdpi="254"
inkscape:export-ydpi="254"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="sample-solid.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview10614"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="1.3546667"
inkscape:cx="172.73622"
inkscape:cy="248.0315"
inkscape:window-width="1360"
inkscape:window-height="695"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs10609" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#00ffff;fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740"
width="50"
height="50"
x="0"
y="0" />
<rect
style="fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-4"
width="50"
height="50"
x="50"
y="0" />
<rect
style="fill:#ffff00;fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-1"
width="50"
height="50"
x="0"
y="50" />
<rect
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7"
width="50"
height="50"
x="50"
y="50" />
<rect
style="fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-9"
width="50"
height="50"
x="0"
y="100" />
<rect
style="fill:#00ff00;fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-4-0"
width="50"
height="50"
x="50"
y="100" />
<rect
style="fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-1-9"
width="50"
height="50"
x="0"
y="150" />
<rect
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.499999;stroke-linejoin:round;stroke-opacity:0"
id="rect10740-7-1"
width="50"
height="50"
x="50"
y="150" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

154
src/ink-calc.py Normal file
View File

@ -0,0 +1,154 @@
import numpy as np
import os
import sys
import tkinter as tk
import threading
import webbrowser
from PIL import Image
from tkinter import filedialog, ttk
# Ink Coverage Calculator
# Version: 0.1
# License: GPL 3.0 or Later
# Author: Ze'ev Schurmann
# Git Repo: https://git.zaks.web.za/thisiszeev/ink-calc
# Dependancies: NumPy, PIL, TKinter
# Support my work: $5 buys me a cup of coffee
# $10 buys me a nice burger
# $20 buys me a bottle of wine
# https://paypal.me/thisiszeev
stop_processing = False
def rgb_to_cmyk(r, g, b):
c = 1 - (r / 255.0)
m = 1 - (g / 255.0)
y = 1 - (b / 255.0)
k = min(c, m, y)
if k < 1:
c = (c - k) / (1 - k)
m = (m - k) / (1 - k)
y = (y - k) / (1 - k)
else:
c = m = y = 0
return c * 100, m * 100, y * 100, k * 100
def calculate_ink_coverage(image_path, progress_var, result_labels, filename_label, root, button):
global stop_processing
image = Image.open(image_path).convert("RGBA")
pixels = np.array(image)
total_pixels = pixels.shape[0] * pixels.shape[1]
processed_pixels = 0
total_c, total_m, total_y, total_k, total_w = 0, 0, 0, 0, 0
filename_label.config(text=os.path.basename(image_path))
for color in ["C", "M", "Y", "K", "W"]:
result_labels[color].config(text=f"{color}: 0.00%")
for i, row in enumerate(pixels):
for j, (r, g, b, a) in enumerate(row):
if stop_processing:
button.config(text="Open PNG File", command=lambda: open_file(progress_var, result_labels, filename_label, root, button))
return
c, m, y, k = rgb_to_cmyk(r, g, b)
w = (a / 255.0) * 100
total_c += (c * a / 255)
total_m += (m * a / 255)
total_y += (y * a / 255)
total_k += (k * a / 255)
total_w += w
processed_pixels += 1
progress = (processed_pixels / total_pixels) * 100
if processed_pixels % (total_pixels // 1000) == 0:
progress_var.set(progress)
root.update_idletasks()
avg_c = total_c / total_pixels
avg_m = total_m / total_pixels
avg_y = total_y / total_pixels
avg_k = total_k / total_pixels
avg_w = total_w / total_pixels
result_labels["C"].config(text=f"C: {avg_c:.2f}%")
result_labels["M"].config(text=f"M: {avg_m:.2f}%")
result_labels["Y"].config(text=f"Y: {avg_y:.2f}%")
result_labels["K"].config(text=f"K: {avg_k:.2f}%")
result_labels["W"].config(text=f"W: {avg_w:.2f}%")
button.config(text="Open PNG File", command=lambda: open_file(progress_var, result_labels, filename_label, root, button))
def open_file(progress_var, result_labels, filename_label, root, button):
global stop_processing
file_path = filedialog.askopenfilename(filetypes=[("PNG files", "*.png")])
if file_path:
stop_processing = False
button.config(text="Stop", command=lambda: stop_process(button))
threading.Thread(target=calculate_ink_coverage, args=(file_path, progress_var, result_labels, filename_label, root, button), daemon=True).start()
def stop_process(button):
global stop_processing
stop_processing = True
button.config(text="Open PNG File", command=lambda: open_file(progress_var, result_labels, filename_label, root, button))
def copy_to_clipboard(root, filename_label, result_labels):
clipboard_text = f"{filename_label.cget('text')}\n"
clipboard_text += "\n".join([result_labels[color].cget('text') for color in ["C", "M", "Y", "K", "W"]])
root.clipboard_clear()
root.clipboard_append(clipboard_text)
root.update()
def open_url(url):
webbrowser.open(url)
def main():
root = tk.Tk()
root.title("Ink Coverage Calculator v0.1")
frame = tk.Frame(root)
frame.pack(padx=10, pady=10)
filename_label = tk.Label(frame, text="", fg="blue")
filename_label.pack()
progress_var = tk.DoubleVar()
progress_bar = ttk.Progressbar(frame, variable=progress_var, maximum=100, length=400)
progress_bar.pack(pady=5)
result_labels = {}
for color in ["C", "M", "Y", "K", "W"]:
label = tk.Label(frame, text=f"{color}: 0.00%")
label.pack()
result_labels[color] = label
button_frame = tk.Frame(frame)
button_frame.pack(pady=5)
open_button = tk.Button(button_frame, text="Open PNG File", command=lambda: open_file(progress_var, result_labels, filename_label, root, open_button))
open_button.grid(row=0, column=0, padx=5)
copy_button = tk.Button(button_frame, text="Copy to Clipboard", command=lambda: copy_to_clipboard(root, filename_label, result_labels))
copy_button.grid(row=0, column=1, padx=5)
links_frame = tk.Frame(frame)
links_frame.pack(pady=5)
buttons = [
("License", "https://www.gnu.org/licenses/gpl-3.0.html"),
("Git Repo", "https://git.zaks.web.za/thisiszeev/ink-calc"),
("Documentation", "https://git.zaks.web.za/thisiszeev/ink-calc/wiki"),
("Buy me a Burger", "https://paypal.me/thisiszeev")
]
for i, (label, url) in enumerate(buttons):
tk.Button(links_frame, text=label, command=lambda u=url: open_url(u)).grid(row=0, column=i, padx=5)
root.mainloop()
if __name__ == "__main__":
main()

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
test-images/sample-blue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
test-images/sample-cyan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 KiB

BIN
test-images/sample-red.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
test-images/sample.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB