« Return to Thread: kipi plugin

kipi plugin

by LucaTringali :: Rate this Message:

| View in Thread

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

 

_______________________________________________
Kde-imaging mailing list
Kde-imaging@...
https://mail.kde.org/mailman/listinfo/kde-imaging

 « Return to Thread: kipi plugin