Skip to main content
Participant
March 11, 2025
Question

Bridge is not exact in its sorting of orientation or aspect ratio.

  • March 11, 2025
  • 2 replies
  • 203 views

For my purposes, I need exactly square images.

 

Luckily Bridge lets me sort by orientation or even more precisely by aspect ratio. However, Bridge is not exact, and has a tolerance for images that are close to square, but are not actually square, that it will filter into the square category.

 

I have not found a way to make the filter be exact, nor have I found what the tolerance is. My preference would be no tolerance, but there is no way to edit this in the preferences, let alone find out what the tolerance is before it starts listing the image as portrait or landscape.

 

This is also true of aspect ratio, and while it is slightly less reasonable to list every exact ratio, I would still like to be the one setting that option rather than not having any option or insight into what the exact cross-over point is.

 

As an example, this image is listed as both square and 1:1. I know it is a small difference but I need that exact accuracy.

 

If there is a different way to fillter to exact squares, please let me know. If there is not, perhaps this could be added somewhere in the settings, like an "Image orientation tolerance" slider starting at whatever percent it is at now down to 0%.

2 replies

Stephen Marsh
Community Expert
Community Expert
March 11, 2025

@cody_1793 – I also consider this a bug, the file can only be one of three orientations at a time: Portrait, Landscape or Square.

 

Bug reports are still handled at a separate site for Bridge (requiring a separate user account):

 

https://adobebridge.uservoice.com/forums/905377-report-bugs

 

@ExUSA – Thank you for posting a scripted solution!

Legend
March 11, 2025

This feature is not available, but you can work around it by determining the aspect ratio with a script and assigning keywords to mark files.

 

Save this script as plain text with a .jsx file extension and place in the Bridge Scripts folder. Run this on selected files then filter by keyword.

 

#target bridge
    if(BridgeTalk.appName == 'bridge'){
        try{
            var ratioCmd = MenuElement.create('command', 'Set Ratio Keyword', 'at the end of Tools'); //create new menu command
            ratioCmd.onSelect = function(){
                Main();
                }
            function Main(){
                try{
                    if(ExternalObject.AdobeXMPScript == undefined) ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript'); //load xmp library
                    if(app.document.selectionsLength == 0){ //check for selection
                        return;
                        }
                    var thumbs = app.document.selections;
                    var kw1 = '1 to 1'; //new keywords
                    var kw2 = 'Not 1 to 1';
                    var wd = 0;
                    var ht = 0;
                    var ratio = 0;
                    var md = null;
                    var xmp = '';
                    var updatedPacket = '';
                    var i = 0;
                    for(i = 0; i < app.document.selectionsLength; i++){ //loop through selections
                        if(thumbs[i].hasMetadata){ //image file with metadata
                            md = thumbs[i].synchronousMetadata; //get metadata
                            xmp = new XMPMeta(md.serialize());
                            wd = thumbs[i].core.quickMetadata.width; //get dimensions
                            ht = thumbs[i].core.quickMetadata.height;
                            ratio = wd / ht; //determine ratio
                            if(ratio == 1){
                                xmp.appendArrayItem(XMPConst.NS_DC, 'subject', kw1, 0,XMPConst.PROP_IS_ARRAY); //add keyword
                                }
                            else{
                                xmp.appendArrayItem(XMPConst.NS_DC, 'subject', kw2, 0,XMPConst.PROP_IS_ARRAY);
                                }
                            updatedPacket = xmp.serialize(XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
                            thumbs[i].metadata = new Metadata(updatedPacket); //update metadata
                            }
                        }
                    }
                catch(e){
                    Window.alert(e + ' ' + e.line); //error
                    }
                }
            }
        catch(e){
            Window.alert(e + ' ' + e.line);
            }
        }