tried sending this through earlier but it was deemed too large.
I'm looking for some help with a batch file. A friend of mine got this working in windows with gthumb, to flicker two images over each other. Would there be anyway to convert this to a sh or bash file and get it running with gthumb 3.4.0Â in Ubuntu 15.10?
but the images can't be aligned whilst the code below would do this.

CODE BELOW:
@echo offÂ
echo %time%Â
SET steps=256Â
SET comparison_size=200Â
REM L ONH 700Â
SET x_start=800Â
REM L ONH 600Â
SET y_start=256Â
SET /a x_center=%x_start%Â
SET /a y_center=%y_start%Â
REM only need to make a single image for comparisonÂ
convert %1 -type grayscale -contrast -contrast -crop %comparison_size%x%comparison_size%+%x_center%+%y_center% img_1.tifÂ
:next_stepÂ
SET best_avg=0Â
SET best_x=0Â
SET best_y=0Â
SET x_offset=-%steps%Â
:loopxÂ
SET y_offset=-%steps%Â
:loopyÂ
SET /a x_pos=%x_center%+%x_offset%Â
SET /a y_pos=%y_center%+%y_offset%Â
convert %2 -type grayscale -contrast -contrast -crop %comparison_size%x%comparison_size%+%x_pos%+%y_pos% img_2.tifÂ
compare img_1.tif img_2.tif -highlight-color Black -lowlight-color White -compose Src comparison.tifÂ
FOR /F "tokens=4 skip=1 delims=," %%i IN ('convert comparison.tif -scale 1x1 -depth 16 txt:-') DO SET this_avg=%%iÂ
IF %this_avg% LEQ %best_avg% GOTO not_bestÂ
SET /a best_x=%x_offset%Â
SET /a best_y=%y_offset%Â
SET /a best_avg=%this_avg%Â
:not_bestÂ
SET /a y_offset=%y_offset%+%steps%Â
IF %y_offset% LEQ %steps% goto loopyÂ
SET /a x_offset=%x_offset%+%steps%Â
IF %x_offset% LEQ %steps% goto loopxÂ
SET /a x_center=%x_center%+%best_x%Â
SET /a y_center=%y_center%+%best_y%Â
echo %x_center%, %y_center%Â
SET /a steps=%steps%/2Â
IF %steps% GEQ 1 goto next_stepÂ
SET /a x_displacement=%x_center%-%x_start%Â
SET /a y_displacement=%y_center%-%y_start%Â
echo Best Match found at X : %x_displacement%, Y : %y_displacement%Â
echo %time%Â
echo Beginning image preparationÂ
composite %1 trans.png circle.jpg first_image.pngÂ
convert -size 2160x1440 xc:white first_image.jpgÂ
composite -geometry +%x_displacement%+%y_displacement% first_image.png first_image.jpg first_image.jpgÂ
composite %2 trans.png circle.jpg second_image.pngÂ
convert -size 2160x1440 xc:white second_image.jpgÂ
composite -geometry +0+0 second_image.png second_image.jpg second_image.jpgÂ
echo %time%