Image 1.0 (content plugin to compare images in sync dirs)

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: sheep, Hacker, Stefan2, white

User avatar
Lefteous
Power Member
Power Member
Posts: 9438
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Image 1.0 (content plugin to compare images in sync dirs)

Post by *Lefteous » 2010-03-27, 14:18 UTC

Use this plugin to compare images by content in synchronize directories. In
addition fields for image dimensions are provided.

How it works:
http://lefteous.totalcmd.net/tc/images/image/sync_pictures.png

Download plugin:
http://lefteous.totalcmd.net/tc/archives/image/wdx_image_1.00.zip

View readme online:
http://lefteous.totalcmd.net/tc/docs/image/readme.txt

Download source code:
http://lefteous.totalcmd.net/tc/archives/image/wdx_image_src_1.00.zip



Ideas for future development:
This plugin could be improved by adding a tolerant comparison. This could include things like 90% identical pixels, minor color deviations or even different image dimensions.
The normal fields could be improved as well: DPI, physical dimensions and so on.
Feel free to add your own ideas.
Last edited by Lefteous on 2010-03-28, 11:19 UTC, edited 4 times in total.

User avatar
Peter
Power Member
Power Member
Posts: 1847
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz
Contact:

Post by *Peter » 2010-03-27, 18:57 UTC

Hello Lefteous

1)
what will the plugin do if one image is a part of the other image?

Example a: You have a TIF, made by scanner, and you remove the white space around the picture.

Example b: You select a part of the image and create with Copy&Paste a new file.

Example c: You have a scan in bad quality (many dirty points - "Schmutz" in german) and you make a "clean file" (remove the dirt ..)

2)
Will the plugin handle compressed file (TIF with LZW or something else ...)

Regards

Peter
TC 9.200a / #266191
Win 7 x64 / Win 10 x64

User avatar
Lefteous
Power Member
Power Member
Posts: 9438
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous » 2010-03-28, 11:28 UTC

The plugin is now online. Please note that this plugin is mainly intended to be the first in a line of content comparators. I hope many ideas will spread - for the plugin itself and other plugins.
I have released the source code along with the plugin to make it other developers easier getting started and also to ask for contribution.

2Peter
Well if you look at the list of future ideas in my first post you'll notice that your ideas are even more ambitious. The plugin currently just checks first if the pictures have identical dimensions. If they are identical it compares every single pixel. Only if all are identical the images are marked as identical. There is no advanced image procession.

User avatar
Peter
Power Member
Power Member
Posts: 1847
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz
Contact:

Post by *Peter » 2010-03-28, 11:31 UTC

Hello Lefteous

your website is dead at the moment ...

Peter
TC 9.200a / #266191
Win 7 x64 / Win 10 x64

User avatar
Lefteous
Power Member
Power Member
Posts: 9438
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous » 2010-03-28, 11:35 UTC

2Peter
That's not my website! It's totalcmd.net - the de-facto standard for listing plugins. The situation makes me sad and angry but I don't think I can do anything about it.
I hope there will be an official website soon which presents all plugins in an appropriate way.

User avatar
Samuel
Power Member
Power Member
Posts: 1862
Joined: 2003-08-29, 15:44 UTC
Location: Brandenburg, Germany
Contact:

Post by *Samuel » 2010-03-28, 12:30 UTC

Lefteous wrote:I hope many ideas will spread - for the plugin itself and other plugins.
Ideas to detect similar but not identical images:
One could resize both images to:
- 4x4 Pixels (detail level 1)
- 16x16 Pixels (detail level 2)
- 64x64 Pixels (detail level 3)

Then compare the small images Pixel by Pixel and sum the differences.
If the sum is below a threshold, then the images were either resized or handled with an effect.
The different levels of detail could indicate how great the similarity is. Additionally the aspect ratio and image sizes should be evaluated.

I cant figure out a good approach to detect cropping.
Perhaps pure cropping could be found by searching the lines within the other image, but cropping on slightly resizing images would be hard.

Evds
Junior Member
Junior Member
Posts: 77
Joined: 2009-06-10, 11:09 UTC

Post by *Evds » 2010-03-28, 13:23 UTC

Hi Lefteous,

thx for the plugin !

In some cases rotating an image by 90° makes that the plugin detects the image as different from the original.
When i rotate the image 90° further it is again detected as equal to the original.

Best regards,

User avatar
petermad
Power Member
Power Member
Posts: 8168
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Post by *petermad » 2010-03-28, 17:07 UTC

2Lefteous
Thanks for this new plugin :-)

Here's the Danish translation:

Code: Select all

[dan]
Width=Bredde
Height=Højde
Dimensions=Dimensioner
Content=Indhold
I have uploaded a zip file with .ico files that are wrongfully shown as having the Dimensions 0 x 0 here: http://www.madsen.homepage.dk/tcmd/icos.zip
License #524
Danish Total Commander Translator
TC 9.21a 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 64bit and TC 2.92b1 on Android 6.0
Get: Extended Total Commander Menus | PHSM-Calendar

User avatar
Sombra
Power Member
Power Member
Posts: 795
Joined: 2005-12-27, 22:23 UTC
Location: Zaragoza, Spain

Post by *Sombra » 2010-03-31, 17:24 UTC

2Lefteous
Seems that you are using the library gdiplus.dll, IIRC this library come installed by default since Windows XP and it can be used in old systems as Windows 2000 if the user download such library.
If it is the case and as suggestion: Maybe you could point to it in the readme.txt :?:
I can read English, but... I write like Tarzan. (sorry)

User avatar
Vochomurka
Power Member
Power Member
Posts: 775
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka » 2010-09-02, 17:26 UTC

I have created the synchronize template as described, except that I've not found the [image.Bitmaps] field: the only field the plugin prodives in this dialog is [image.Contents]. If to enter "Bitmaps" manually, it does not work.
Then I've noticed very strange behaviour: if image names on both sides are the same, then the plugin always treats them as "images equal", irrespective of their contents (they are quite different image sets) and size.
What is my mistake?
Fields [image.Width] etc. are displayed correctly.
Single user license #329241
PowerPro scripts for Total Commander

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36782
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2010-09-06, 13:57 UTC

Please read the first post to understand how to use the plugin. As described in the readme, the field "Contents" is only available in "synchronize directories". It's used by TC to compare two images by content even if other data like EXIF fields or descriptions differ.
Author of Total Commander
http://www.ghisler.com

User avatar
Vochomurka
Power Member
Power Member
Posts: 775
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka » 2010-09-07, 05:59 UTC

Thank you, I have understood it already using the internal tc plugin to compare text files with different line breaks. (By the way, the Image plugin description above is not fairly clear. For example, EXIT is not mentioned).
Anyway, thanks.
Single user license #329241
PowerPro scripts for Total Commander

enginigger
New Member
New Member
Posts: 1
Joined: 2010-10-14, 06:22 UTC

Post by *enginigger » 2010-10-14, 09:31 UTC

Thank you for useful plugin, but it don't work correctly for me.
I copy image file to another dir, then resize it with any editor. Your plugin in "Custom columns mode" shows that 2 images have different width/heigth/dimensions. Then I synchronize dirs and it shows me that 2 image files are identical with "images equal" icon.
I tried it on TC 7.55a Win7ult x64/WinXPsp3 x32

User avatar
Peter
Power Member
Power Member
Posts: 1847
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz
Contact:

Post by *Peter » 2011-05-12, 07:15 UTC

Hello Lefteous

small typo: In Readme.txt you wrote

Code: Select all

6. Another dialog is displayed. Click the + button to add the following field definition: [=image.Bitmaps]
but the correct definition is

Code: Select all

....field definition: [=image.Content]
Software "XnView" can add a "comment" ( a kind of Metadata ...), and now the comparison says "image not equal".
Do you need an example-file?

Peter
TC 9.200a / #266191
Win 7 x64 / Win 10 x64

User avatar
Lefteous
Power Member
Power Member
Posts: 9438
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous » 2011-05-12, 17:22 UTC

2Peter
Yes please send me a previous and an after image.

Post Reply