[gthumb-list] Flicker




Hi All,

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?

I use my own flicker script using imagemagick at the moment using 
animate -delay 50 -resize 600x600 %F %F.gif
but the images can't be aligned whilst the code below would do this.

Many thanks




computer_aligned.gif
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%

On Wed, 9 Mar 2016 at 11:04 Iain Mellis <iainmellis googlemail com> wrote:
I think that would be sensible. Many thanks for looking into this.


On Fri, 4 Mar 2016 at 20:35 Paolo Bacchilega <paolo bacchilega libero it> wrote:
Il 04/03/2016 19:12, Dr. Michael J. Chudobiak ha scritto:
>> For some reason the catalog date is considered more interesting than the
>> name, honestly I don't remember why.  Sorting by name seems a more
>> natural choice to me.  I will change the sort order before the next
>> release if no one has anything against that.
>
> Nothing against that, but I do miss the ability to change the browser
> sorting order. It would be nice to be able to sort by name, or mtime, or
> original photo date, description, etc...

I was talking about the catalog order in the tree view, not about the
image list order, which  by the way can be changed from the actions
menus (the rightmost button on the headerbar).

- Paolo
_______________________________________________
gthumb-list mailing list
gthumb-list gnome org
https://mail.gnome.org/mailman/listinfo/gthumb-list
--
Kind regards


Iain Mellis
BSc(Hons)MCOptom Prof Cert LV
--
Kind regards


Iain Mellis
BSc(Hons)MCOptom Prof Cert LV
--
Kind regards


Iain Mellis
BSc(Hons)MCOptom Prof Cert LV


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]