[Kde-imaging] kipi plugin

LucaTringali TRINGALINVENT at libero.it
Tue Jul 24 13:54:28 UTC 2012


Hello, I have made a simple script based on ImageMagick to mix two images (left and right) into an anaglyph (to see with red-cyan glasses):
leftimage=$1
rightimage=$2
outputfile=$3
# Mixing the two images
convert $leftimage -gravity east -chop 24x0 $outputfile-leftimage2.png
convert $rightimage -chop 24x0 $outputfile-rightimage2.png
convert $outputfile-leftimage2.png -level 0%,100%,1.2 $outputfile-leftimage3.png
convert $outputfile-rightimage2.png -level 0%,100%,1.0 $outputfile-rightimage3.png
convert $outputfile-leftimage3.png -channel r -fx '+u.r*0 + u.g*0.66 + u.b*0.33' -channel g -fx '+u.r*0 + u.g*0 + u.b*0' -channel b -fx '+u.r*0 + u.g*0 + u.b*0' $outputfile-red.png
convert $outputfile-rightimage3.png -channel R -fx 0 $outputfile-cyan.png
convert $outputfile-red.png -channel r -separate "(" +channel $outputfile-cyan.png -separate -delete -3 ")" +channel -combine -depth 8 $outputfile
rm $outputfile-*.png
It works quite good, and I think it could be used to create a kipi-plugin, but I actually don't have the time to write a plugin. If some one in this list wants to build an anaglyph plugin for Gwenview and Digikam, please feel free to use this code.
Luca Tringali 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-imaging/attachments/20120724/235803c7/attachment.html>


More information about the Kde-imaging mailing list