Programowanie w systemie UNIX/imagemetadata: Różnice pomiędzy wersjami

Usunięta treść Dodana treść
Linia 34:
 
mediainfo k.png
 
Konwersja z zachowaniem danych tekstowych :
* własny program <ref>[https://github.com/gbenison/png-text-embed Insert "text chunks" into PNG files (and read text chunks) by Gregory C Benison]</ref>
* pngcrush<ref>[http://pwet.fr/man/linux/commandes/pngcrush pngcrush]</ref>
* Image Magic <ref>[http://blog.client9.com/2007/08/19/editing-png-metadata-from-command-line.html Editing PNG Metadata from the Command Line by Nick Galbreath]</ref><ref>[ftp://ftp.tuwien.ac.at/graphics/ImageMagick/www/command-line-options.html#set Image Magic set]</ref>
* pnmtopng
 
 
<source lang=bash>
#!/bin/bash
## mightymandel -- GPU-based Mandelbrot Set explorer
## Copyright (C) 2012,2013,2014,2015 Claude Heiland-Allen
## License GPL3+ http://www.gnu.org/licenses/gpl.html
## http://code.mathr.co.uk/mightymandel/blob_plain/HEAD:/extra/ppm2png.sh
## http://mightymandel.mathr.co.uk/current/usage.html#usagemetadata
## ./extra/ppm2png.sh *.ppm
##
 
for X in "$@"
do
echo -e "Title\t$(head -n 2 "${X}" | tail -c +19)\nSoftware\tmightymandel" > "${X}.txt" &&
tail -n +3 "${X}" | while read prefix line
do
if [[ "${prefix}" == "#" ]]
then
if [[ "${line}" == "software mightymandel" ]]
then
echo -n "mightymandel"
else
echo " ${line}"
fi
else
break
fi
done >> "${X}.txt"
pnmtopng -interlace -force -compression 9 -text "${X}.txt" "${X}" > "${X%ppm}png" &&
rm "${X}.txt"
done
</source>
 
== programy w trybie graficznym==