This is my IMatch-Scriptsection!

You can find some (maybe) useful scripts for Mario Westphals IMatch.
IMatch is a very powerfull Image-Management/Database-Software.

If you don't know it, have a look at http://www.photools.com/

 

These Scripts can be used any way, but also without any kind of warranty!

If you don't agree, please leave now.


|  Overview  |  Sitemap  |  Downloads  |   last update: June 12, 2022


newScriptTeaser, a little Winkyman = new Script      updatedScriptTeaser, a little Winkyman = updated Script

DB-Organization:

Multi Database Transmission V 1.2 (06-Jun-2003) - This script transmits Images from a SourceDB to a TargetDB, preserving all Category-Assignments and Property-Entries. (And, *g*, if Mario would give us an updated Timestamp for the DatabaseImageRecords, we could merge Databases by checking which Entry is newer. Think about mobile IMatch.)

Remove Empty Categories from Database V 1.0 (30-May-2003) - This script removes all 'empty'-Categories from the active Database.

OffLineCache Garbage Collector V 1.0 (28-Jun-2003) - This script checks all existing Images in OfflineCacheFolder of the active Database and deletes ownerless OLC-Images. Additionally you can select some Categories from which you want delete the Images OfflineCache-pendants.

 

Image-Manipulation:

Photoshop Conversion (PS 5.5 + 6) V 0.9 (02-Jul-2003) - This Script combines the ManagementPower of IMatch with the ImageManipulationPower of Adobes Photoshop 6.0 in an easy to use way. This Script I have written together with Klaus Schwarzburg. Many thanks for your help, Klaus.

lcms Webgallery Creator V 0.1 (05-Oct-2002) - This script enhance the original Webgallery-Creator-Script with an ICC-Conversion-feature.

little Batch Converter V 1.2 (26-Jun-2003) - This script create resized copies, optionally with ICC-Conversion for Tiff- and Jpeg-sources. Can work with OfflineCacheImages instead of originals and can transmit all Property-, Category- and IPTC-data to the copies.

 

Libs

Registry Functions V 1.0 (01-Nov-2002) - A littleHelper-Script to put and retrieve Data to/from Registry in its correct DataTypes. VB usually provides only the StringType. With this Lib you can store every DataType to Registry (Byte, Integer, Long, Double, Decimal, Boolean, Variant, ...).

Debug Messages V 1.0 (08-Nov-2002) - A littleHelper-Script which handles Debugoutput in Priorityclasses. With this you can have good Informationoutput when you develope a Script and a less or no Output when run the Script in Productivity-Mode. Your DebugmessagePoints can stay in code without any (auswirkung). Usefull for future changes on your code.

 

 


This is my first Script.
It enhance the original Webgallery Creator Script with an ICC-ConversionFeature.

To deal with ICC-profiles we can use openSource software of 'the little cms project'.
For converting TIFF- and JPEG-files between different colorspaces we need the two commandline tools tifficc.exe and jpegicc.exe.

To set your Webgallery-Creator ready to deal with ICC-profiles you also need my enhanced Webgallery Creator Script.
To let you run the original and the new script parallel, i have added a '_hn273' to every filename. So you can copy these files into your IMatch-scriptfolder and no existing files or features will be changed.

Ok, for those who know: I've worked with the imwg-files created by ks and djb which are available in the userscript-download-section. So if you use this one and want to work with my new one too, you only need my new one, because if you leave all additional-feature-checkboxes unchecked, it operates like the original one.

The two original Scripts (imwg_main.bas + imwg_core.cls) are from the author of IMatch, Michael Westphal. He shipped them with IMatch as ScriptingExamples.


Explanation
MainScript: New_Part_of_CreateBitmapFunction.txt
Needed Modules: [ICC_ConversionFunction.txt]



ICC_ConversionFunction.txt: (111 lines / 73 real codelines / 0 Subs / 1 Function / 0 Properties)

1| 2| [...] 3| 4| Public Function hn_ICC_conversion(Filename As String, _ 5| convProg As String, ImageListName As String) As String 6| 7| Dim checkfile As Variant 8| Dim check As Integer 9| Dim errmsg As String 10| Dim outputICCfile As String 11| Dim tempfile As String 12| Dim params As String 13| 14| ' here we define a name and path for a tempfile and check if an old 15| ' tempfile already exists. (in case yes, we kill 'em) 16| tempfile = Environ("TEMP") & "\temp" & hn_GetFileType(Filename) 17| checkfile = Dir(tempfile) 18| If Len(checkfile) <> 0 Then 19| Kill tempfile 20| End If 21| 22| 'here we get the Path of the external Program and the ICC-files 23| 'this will be changed by using user.variables or storing the values in the registry 24| params = hn_GetUserVar("params_" & convProg & "icc") 25| convProg = hn_GetUserVar("progpath_" & convProg & "icc") 26| outputICCfile = hn_GetUserVar("progpath_ICCsRGB") 27| 28| check = 2 ' The number of external files/progs we have to use with our Batchcall 29| 30| 'here we check if all external files are available 31| checkfile = Dir(convProg) 32| If Len(checkfile) <> 0 Then 33| check = check -1 34| Else 35| errmsg = errmsg & "Can't find the conversionprogramm: '" & convProg & "'!" & Chr(13) 36| End If 37| checkfile = Dir(outputICCfile) 38| If Len(checkfile) <> 0 Then 39| check = check -1 40| Else 41| errmsg = errmsg & "Can't find the ICC-profile: '" & outputICCfile & "'!" & Chr(13) 42| End If 43| 44| 45| If check > 0 Then 46| 47| 'If not all Profiles and the Prog are available we give a Message and leave the Function 48| tempfile = "noprog" 49| errmsg = "Errors occured:" & Chr(13) & errmsg & Chr(13) 50| MsgBox(errmsg,vbCritical,"Prog or Profile not available!") 51| 52| Else 53| 54| 'If all profiles and the prog are available we create a Batchfile and start the Shell-Process 55| Dim ICCbatchfile As String 56| ICCbatchfile = Environ("TEMP") & "\IMatchICCconv.bat" 57| checkfile = Dir(ICCbatchfile) 58| If Len(checkfile) <> 0 Then 59| Kill ICCbatchfile 60| End If 61| 62| Open ICCbatchfile For Append As #15 63| 64| Print #15, "@echo off" 65| Print #15, "TITLE External ICC-conversionprocess of IMatch-WebGalleryCreator 66| Print #15, "echo." 67| Print #15, "echo." 68| Print #15, "echo ! Please do not close this window manuallly !" 69| Print #15, "echo ! It will go away after the Conversionprocess has finished !" 70| Print #15, "echo." 71| Print #15, "echo." 72| Print #15, "echo ICC-Conversion of: " & Filename 73| Print #15, "echo to Tempfile: " & tempfile 74| Print #15, "echo current ImageList: " & ImageListName 75| Print #15, "echo." 76| Print #15, "echo." 77| Print #15, "echo ... starting " & convProg & ":" 78| Print #15, "echo." 79| Print #15, convProg & " " & Trim$(params) & " -o" & outputICCfile _ 80| Print #15, & " """ & Filename & """ " & """" & tempfile & """" 81| 82| Close #15 83| 84| convProg = Environ("COMSPEC") & " /C " & ICCbatchfile 85| ShellandWait(convProg) 86| Rem Kill ICCbatchfile 87| 88| 'After the Shell-Process has terminated we check if it has produced our tempfile 89| checkfile = Dir(tempfile) 90| If Len(checkfile) <> 0 Then 91| 'It has, great. But ... 92| '...because of a little Bug in the little-CMS-progs 93| 'we have to check if the filesize is greater then 8 Byte! 94| If FileLen(tempfile) < 9 Then tempfile = "nofile" 95| Else 96| 'It has not, we set the variable to nofile 97| tempfile = "nofile" 98| End If 99| 100| End If 101| 102| 'at the end of this function the variable tempfile contains: 103| '- the value "noprog" 104| '- the value "nofile" 105| '- the filepath of the sourcefile 106| hn_ICC_conversion = tempfile 107| 108| End Function 109| 110| [...] 111|

(TOP)