/************************************************************************************************ * * PhotoGrok Script * * Show a red dot on thumbnails if image contains gps data. Assumes the GPSLatitude tag is * included in catalog (when executed in catalog mode). * * Requires the following JavaScript filter to be set: * * GPSLatitude,FileName,Directory | JavaScript Expression | match(GPSLatitude,FileName,Directory) * ************************************************************************************************/ var imgList = new java.util.ArrayList(); function match(gps, fn, d){ if(gps != '-'){ var val = (fn + '' + d).hashCode(); imgList.add(val); } return true; } var tpainter = function(gfx, image, ig, pp){ var val = (pp.file + '' + pp.dir).hashCode(); if(imgList.indexOf(val) != -1){ gfx.setColor(Color.RED); gfx.fillRect(0,0,3,3); } }; setThumbnailPainter(tpainter);