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.

 

 


Photoshop Conversion

This Script uses the Adobe Photoshop 6.0 (or 5.5) Type Library as ImageEditor via OLE-automation.

You can convert Images between FileFormats or manipulate them with preserving Colorspace Profiles, IPTC-Information, Pathes and additional Channels automatically, Scaling, set a DPI-Value, assign ICC-Profiles or convert to another ICC-Colorspace, ...

... you can run Photoshop-Actions by simple selecting them from a DropdownBox in IMatch, you can first run a Simulation to check for FilenameErrors, you can create copies or run directly on the original files, ...

... all by using Adobe Photoshop from within IMatch. Your created Image Copies can added directly to the Database, can be Bookmarked, copied all in one Targetfolder or in one Subfolder for every Sourcedirectory, ...

... NEW since ScriptVersion 0.9: I have embedded my Transmission-Class. Now you also can transmit all Properties and/or Categories to copied images.

... Note: I haven't checked the script with PS 7. [Don't have it. Waiting until PS 8 for a upgrade ;-)]

 


Explanation
MainScript: hn_PhotoshopConversion.bas
Needed Modules: [hnFncPSOLE.lib] [hnFncUtils.lib] [hnClsRegKey.cls] [hnPSoleDeclarations.lib] [hnPublicDeclarations.lib]



hnPSoleDeclarations.lib: (348 lines / 232 real codelines / 0 Subs / 1 Function / 0 Properties)

1| '#Reference {4B0AB3E1-80F1-11CF-86B4-444553540000}#6.0#409#D:\Programme\Adobe\Photoshop 6.0\TypeLibrary.tlb#Adobe Photoshop 6.0 Type Library 2| 3| 4| 'This file needs the Adobe Photoshop 5.5 or 6.0 Type Library 5| 'Check: Edit > References 6| 7| 8| Option Explicit 9| 10| 11| ' ------------------------------------------------------------------------------------------- 12| ' ClsDbgLog 13| ' --------- 14| Public Enum DbgLogOutputType 15| NoOutput = 0 16| OutputLog = 1 17| OutputDbg = 2 18| OutputBoth = 3 19| End Enum 20| Public Enum OutPutPriority 21| low = 0 22| medium = 1 23| high = 2 24| Production = 3 25| End Enum 26| Public Enum DbgMsgFuncPos 27| FunctionEntry 28| duringFunctionProcess 29| FunctionExit 30| SubProcess 31| End Enum 32| Public Enum LogfileInfoType 33| ERRORS 34| INFOS 35| End Enum 36| Public Enum DbgClsIsOfType 37| Logg 38| Dbg 39| End Enum 40| 'Bezeichnungen moeglicher Farbraeume 41| Public Const COLORMODE_1 As String = "RGB" 42| Public Const COLORMODE_2 As String = "Graustufen" 43| Public Const COLORMODE_3 As String = "CMYK" 44| Public Const COLORMODE_4 As String = "Indiziert" 45| Public Const COLORMODE_5 As String = "Duotone" 46| Public Const COLORMODE_6 As String = "RAW" 47| Public Const COLORMODE_7 As String = "Lab" 48| Public Const ICCNAME_sRGB As String = "sRGB IEC61966-2.1" 49| Public Const ICCNAME_ECI As String = "ECI-RGB.icc" 50| Public Const ICCNAME_Adobe As String = "Adobe RGB (1998)" 51| Public Const ICCNAME_CMYK As String = "Offset_Bilderdruck.icc" 52| Public Const ICCNAME_Gray10 As String = "Dot Gain 10 %" 53| Public Const ICCNAME_Gray15 As String = "Dot Gain 15 %" 54| Public Const ICCNAME_Gray20 As String = "Dot Gain 20 %" 55| 56| 'The MainCatName, if there are any. If you use a MainCat, PLEASE add a DOT to the name! 57| Public Const IA_MAIN As String = "ImageAttribute." 58| 'The ParentNames for 59| Public Const EDITSTATE_CAT As String = "1_Bearbeitungsstatus" 'is the ParentCatName which holds the EditState-Childs 60| Public Const COLORSPACE_CAT As String = "2_Farbmodus" 'is the ParentCatName which holds the ColorSpace-Childs 61| Public Const ICCNAME_CAT As String = "3_ICCProfil" 'is the ParentCatName which holds the IccProfilename-Childs 62| Public Const BITRATE_CAT As String = "4_Farbtiefe" 'is the ParentCatName which holds the Bitrate-Childs 63| Public Const EMBEDDS_CAT As String = "5_Embedds" 'is the ParentCatName which holds the Embedds-Childs 64| 'The Retouche ChildCatNames 65| Public Const RETOUCHE As String = "2-Retusche" 66| Public Const RAtxt As String = "Schaerfe" 67| Public Const RBtxt As String = "Farbkorrektur" 68| Public Const RCtxt As String = "Staubretusche" 69| 'The Embedds ChildCatNames 70| Public Const PATHES As String = "Pfade" 71| Public Const CLIPPINGPATH As String = "Freistellpfad" 72| Public Const ALPHACHANNELS As String = "AlphaKanaele" 73| Public Const LAYERS As String = "Ebenen" 74| 'DefaultValues (ChildCategories) 75| Public Const EDITSTATE_default As String = "1-Roh_RAW" 76| Public Const COLORSPACE_default As String = "RGB" 77| Public Const ICCNAME_default As String = "NONE" 78| Public Const BITRATE_default As String = "16bit" 79| 'Concatenate Parents 80| Public Const EDITSTATE_CATEGORY As String = IA_MAIN & EDITSTATE_CAT 81| Public Const COLORSPACE_CATEGORY As String = IA_MAIN & COLORSPACE_CAT 82| Public Const ICCNAME_CATEGORY As String = IA_MAIN & ICCNAME_CAT 83| Public Const BITRATE_CATEGORY As String = IA_MAIN & BITRATE_CAT 84| Public Const EMBEDDS_CATEGORY As String = IA_MAIN & EMBEDDS_CAT 85| Public Const RETOUCHE_CATEGORY As String = IA_MAIN & EDITSTATE_CAT & "." & RETOUCHE 86| 'Concatenate Embedds-Childs 87| Public Const PATHES_CAT As String = EMBEDDS_CATEGORY & "." & PATHES 88| Public Const CLIPPINGPATH_CAT As String = EMBEDDS_CATEGORY & "." & CLIPPINGPATH 89| Public Const ALPHACHANNELS_CAT As String = EMBEDDS_CATEGORY & "." & ALPHACHANNELS 90| Public Const LAYERS_CAT As String = EMBEDDS_CATEGORY & "." & LAYERS 91| 'ParentCatName which holds the JobNames, Clientnames or something similar 92| Public Const JOBTICKET_CATEGORY As String = "JobTickets.Tickets" 93| 'DefaultValues (ChildCategories) 94| Public Const JOBTICKET_default As String = "StudioTicket" 95| 'The MainCatName, if there are any. If you use a MainCat, PLEASE add a DOT to the name! 96| Public Const WF_MAIN As String = "Workflow." 97| 'The ParentCatName which holds the Formula with the current JobTicketName! 98| Public Const CURRENTJOB_CATEGORY As String = WF_MAIN & "aktuellerJob" 99| Public Const CURRENTJOB_DESC_0 As String = " | alle Farbmodi und Bearbeitungsstufen" 100| Public Type WorkflowParentCatObject 101| EditstateParentName As String 102| ColorspaceParentName As String 103| IccNameParentName As String 104| BitrateParentName As String 105| EmbeddsParentName As String 106| JobticketParentName As String 107| CurrentJobCatName As String 108| End Type 109| Public Type WorkflowChildCatObject 110| AssignTo_EDITSTATE As String 111| AssignToA As Boolean 112| AssignToB As Boolean 113| AssignToC As Boolean 114| AssignTo_COLORSPACE As String 115| AssignTo_ICCNAME As String 116| AssignTo_BITRATE As String 117| AssignTo_JOBTICKET As String 118| AssignToLayers As Boolean 119| AssignToPathes As Boolean 120| AssignToClippingPath As Boolean 121| AssignToAlphaChannel As Boolean 122| End Type 123| Public Type WorkflowRetoucheObject 124| IsInUse As Boolean 125| ParentName As String 126| ChildAName As String 127| ChildBName As String 128| ChildCName As String 129| AssignToA As Boolean 130| AssignToB As Boolean 131| AssignToC As Boolean 132| End Type 133| Public Type WorkflowEmbeddsObject 134| ParentName As String 135| PathesName As String 136| ClippingPathName As String 137| AlphaChannelName As String 138| LayersName As String 139| AssignToLayers As Boolean 140| AssignToPathes As Boolean 141| AssignToClippingPath As Boolean 142| AssignToAlphaChannel As Boolean 143| End Type 144| Public Enum PS_DefaultColorspaces 145| phClassRGBColorMode = phClassRGBColorMode 146| phClassCMYKColorMode = phClassCMYKColorMode 147| phClassGrayscaleMode = phClassGrayscaleMode 148| phClassLabColorMode = phClassLabColorMode 149| phClassMultichannelMode = phClassMultichannelMode 150| phClassBitmapMode = phClassBitmapMode 151| phClassIndexedColorMode = phClassIndexedColorMode 152| phClassDuotoneMode = phClassIndexedColorMode 153| End Enum 154| Public Enum PS_ColorMode 155| phEnumCMYKColor = phEnumCMYKColor 156| phEnumRGBColor = phEnumRGBColor 157| phEnumLabColor = phEnumLabColor 158| phEnumGrayScale = phEnumGrayScale 159| phEnumIndexedColor = phEnumIndexedColor 160| phEnumDuotone = phEnumDuotone 161| phEnumMultichannel = phEnumMultichannel 162| End Enum 163| Public Enum PS_ByteOrder 164| phEnumOS2 = phEnumOS2 165| phEnumWindows = phEnumWindows 166| phEnumMacintosh = phEnumMacintosh 167| phEnumIBMPC = phEnumIBMPC 168| End Enum 169| Public Enum PS_epsPreview 170| 'None = 0 171| phEnumTIFF = phEnumTIFF 172| End Enum 173| Public Enum PS_epsDepth 174| phEnum1BitPerPixel = phEnum1BitPerPixel 175| phEnum8BitsPerPixel = phEnum8BitsPerPixel 176| End Enum 177| Public Enum PS_epsEncoding 178| phEnumASCII = phEnumASCII 179| phEnumBinary = phEnumBinary 180| phEnumJPEG = phEnumJPEG 181| End Enum 182| Public Enum PS_epsEncodingJPEGQuality 183| phEnumLowQuality = phEnumLowQuality 184| phEnumMediumQuality = phEnumMediumQuality 185| phEnumHighQuality = phEnumHighQuality 186| phEnumMaximumQuality = phEnumMaximumQuality 187| End Enum 188| Public Type PSAppInfo 189| MemoryUsagePercent As Long 190| SaveComposite As Boolean 191| SaveAdvancedTiff As Boolean 192| 'ColorSettings As String 'disabled 193| openDocs As Integer 194| End Type 195| Public Type PSDocInfo 196| ColorMode As PS_ColorMode 197| NumberOfPathes As Integer 198| ClippingPathIndex As Integer 199| NumberOfLayers As Integer 200| NumberOfChannels As Integer 201| hasProfile As Boolean 202| Depth As Integer 203| Copyright As Boolean 204| Watermark As Boolean 205| IsDirty As Boolean 206| End Type 207| Public Type PSffGlobal 208| LowerCase As Boolean 209| EmbedProfiles As Boolean 210| End Type 211| Public Type PSffJPEG 212| quality As Byte 213| optimized As Boolean 214| scans As Byte 215| End Type 216| Public Type PSffTIFF 217| byteorder As PS_ByteOrder 218| LZW As Boolean 219| End Type 220| Public Type PSffEPS 221| Preview As Long 222| Depth As Long 223| Encoding As Long 224| EncodingJPEGQuality As Long 225| HalftoneScreen As Boolean 226| Transfer As Boolean 227| ColorManagement As Boolean 228| End Type 229| 230| 231| Public dbgmsg As Boolean 232| Public PromptMe As Boolean 233| Public DbgOutPutPriority As OutPutPriority 234| 235| 236| Public Function DoDbgMsg(ByVal Priority As OutPutPriority, ByVal FuncName As String, ByVal Pos As DbgMsgFuncPos, ByVal OutputMsg As String) 237| 238| If dbgmsg And Priority >= DbgOutPutPriority Then 239| Dim Position As String 240| Select Case Pos 241| Case duringFunctionProcess 242| Position = "duringFunctionProcess" 243| Case FunctionEntry 244| Position = "FunctionEntry" 245| Case FunctionExit 246| Position = "FunctionExit" 247| Case SubProcess 248| Position = "SubProcess" 249| End Select 250| 251| Dim ShortMessage As Boolean 252| If DbgOutPutPriority = Production Or DbgOutPutPriority = high Then ShortMessage = True 253| 254| Dim mymsg As String 255| If Not ShortMessage Then mymsg = "Function-/SubName:" & FuncName & vbNewLine 256| If Not ShortMessage Then mymsg = mymsg & "Position:" & Position & vbNewLine 257| If Not ShortMessage Then mymsg = mymsg & "DebugInfo:" & vbNewLine 258| 259| mymsg = mymsg & Replace(OutputMsg,Chr(13),vbNewLine) 260| 261| If PromptMe Then 262| MsgBox(mymsg,vbInformation,"DebugInfo") 263| Else 264| If Not ShortMessage Then Debug.Print vbNewLine & "----------------------" & vbNewLine 265| Debug.Print mymsg 266| End If 267| 268| End If 269| 270| End Function 271| 272| 273| 274| 275| '### FunctionList: 276| ' - Public Function DoDbgMsg(ByVal Priority As OutPutPriority, ByVal FuncName As String, ByVal Pos As DbgMsgFuncPos, ByVal OutputMsg As String) 277| 278| '### Public Declarations: 279| ' - Public Const ALPHACHANNELS As String = "AlphaKanaele" 280| ' - Public Const ALPHACHANNELS_CAT As String = EMBEDDS_CATEGORY & "." & ALPHACHANNELS 281| ' - Public Const BITRATE_CAT As String = "4_Farbtiefe" 'is the ParentCatName which holds the Bitrate-Childs 282| ' - Public Const BITRATE_CATEGORY As String = IA_MAIN & BITRATE_CAT 283| ' - Public Const BITRATE_default As String = "16bit" 284| ' - Public Const CLIPPINGPATH As String = "Freistellpfad" 285| ' - Public Const CLIPPINGPATH_CAT As String = EMBEDDS_CATEGORY & "." & CLIPPINGPATH 286| ' - Public Const COLORMODE_1 As String = "RGB" 287| ' - Public Const COLORMODE_2 As String = "Graustufen" 288| ' - Public Const COLORMODE_3 As String = "CMYK" 289| ' - Public Const COLORMODE_4 As String = "Indiziert" 290| ' - Public Const COLORMODE_5 As String = "Duotone" 291| ' - Public Const COLORMODE_6 As String = "RAW" 292| ' - Public Const COLORMODE_7 As String = "Lab" 293| ' - Public Const COLORSPACE_CAT As String = "2_Farbmodus" 'is the ParentCatName which holds the ColorSpace-Childs 294| ' - Public Const COLORSPACE_CATEGORY As String = IA_MAIN & COLORSPACE_CAT 295| ' - Public Const COLORSPACE_default As String = "RGB" 296| ' - Public Const CURRENTJOB_CATEGORY As String = WF_MAIN & "aktuellerJob" 297| ' - Public Const CURRENTJOB_DESC_0 As String = " | alle Farbmodi und Bearbeitungsstufen" 298| ' - Public Const EDITSTATE_CAT As String = "1_Bearbeitungsstatus" 'is the ParentCatName which holds the EditState-Childs 299| ' - Public Const EDITSTATE_CATEGORY As String = IA_MAIN & EDITSTATE_CAT 300| ' - Public Const EDITSTATE_default As String = "1-Roh_RAW" 301| ' - Public Const EMBEDDS_CAT As String = "5_Embedds" 'is the ParentCatName which holds the Embedds-Childs 302| ' - Public Const EMBEDDS_CATEGORY As String = IA_MAIN & EMBEDDS_CAT 303| ' - Public Const IA_MAIN As String = "ImageAttribute." 304| ' - Public Const ICCNAME_Adobe As String = "Adobe RGB (1998)" 305| ' - Public Const ICCNAME_CAT As String = "3_ICCProfil" 'is the ParentCatName which holds the IccProfilename-Childs 306| ' - Public Const ICCNAME_CATEGORY As String = IA_MAIN & ICCNAME_CAT 307| ' - Public Const ICCNAME_CMYK As String = "Offset_Bilderdruck.icc" 308| ' - Public Const ICCNAME_ECI As String = "ECI-RGB.icc" 309| ' - Public Const ICCNAME_Gray10 As String = "Dot Gain 10 %" 310| ' - Public Const ICCNAME_Gray15 As String = "Dot Gain 15 %" 311| ' - Public Const ICCNAME_Gray20 As String = "Dot Gain 20 %" 312| ' - Public Const ICCNAME_default As String = "NONE" 313| ' - Public Const ICCNAME_sRGB As String = "sRGB IEC61966-2.1" 314| ' - Public Const JOBTICKET_CATEGORY As String = "JobTickets.Tickets" 315| ' - Public Const JOBTICKET_default As String = "StudioTicket" 316| ' - Public Const LAYERS As String = "Ebenen" 317| ' - Public Const LAYERS_CAT As String = EMBEDDS_CATEGORY & "." & LAYERS 318| ' - Public Const PATHES As String = "Pfade" 319| ' - Public Const PATHES_CAT As String = EMBEDDS_CATEGORY & "." & PATHES 320| ' - Public Const RAtxt As String = "Schaerfe" 321| ' - Public Const RBtxt As String = "Farbkorrektur" 322| ' - Public Const RCtxt As String = "Staubretusche" 323| ' - Public Const RETOUCHE As String = "2-Retusche" 324| ' - Public Const RETOUCHE_CATEGORY As String = IA_MAIN & EDITSTATE_CAT & "." & RETOUCHE 325| ' - Public Const WF_MAIN As String = "Workflow." 326| ' - Public Enum DbgClsIsOfType 327| ' - Public Enum DbgLogOutputType 328| ' - Public Enum DbgMsgFuncPos 329| ' - Public Enum LogfileInfoType 330| ' - Public Enum OutPutPriority 331| ' - Public Enum PS_ByteOrder 332| ' - Public Enum PS_ColorMode 333| ' - Public Enum PS_DefaultColorspaces 334| ' - Public Enum PS_epsDepth 335| ' - Public Enum PS_epsEncoding 336| ' - Public Enum PS_epsEncodingJPEGQuality 337| ' - Public Enum PS_epsPreview 338| ' - Public Type PSAppInfo 339| ' - Public Type PSDocInfo 340| ' - Public Type PSffEPS 341| ' - Public Type PSffGlobal 342| ' - Public Type PSffJPEG 343| ' - Public Type PSffTIFF 344| ' - Public Type WorkflowChildCatObject 345| ' - Public Type WorkflowEmbeddsObject 346| ' - Public Type WorkflowParentCatObject 347| ' - Public Type WorkflowRetoucheObject 348|

(TOP)