• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How to cut out photos [PIRATED SOFTWARE — LOCKED BY MODERATOR]

Explorer ,
Jul 30, 2021 Jul 30, 2021

Copy link to clipboard

Copied

Hi,

 

I have more than a hundred old black and white photos that was scanned in jpg. They have all an white border that I want to cut out. Is there a way to computerize these photos in batch with Photoshop CC (2017 version on Windows 10) to cut out their border, which are all different widths. You can see two examples I have included here.

 

Thank you!

TOPICS
Actions and scripting , Windows

Views

6.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 06, 2021 Aug 06, 2021

Let us be clear :

CS versions were sold with perpetual licenses. The last CS version was CS6

 

CC versions are all subscription only. Be that CC, CC 2014, 2015 .....etc ALL CC versions are subscription only and the subscription gives you access to the current versions. If you are using a "perpetual version" of CC then it is a hacked, pirated copy and as such illegal.

 

Dave

Votes

Translate

Translate
Adobe
Explorer ,
Aug 10, 2021 Aug 10, 2021

Copy link to clipboard

Copied

Thank you for this information.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 13, 2021 Aug 13, 2021

Copy link to clipboard

Copied

You are using pirated, illegal software.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 06, 2021 Aug 06, 2021

Copy link to clipboard

Copied

quote

I don't have Photoshop subscription. I bought my Ps CC 2017 on the internet site of Software Deal.

============

@Michel6755,

Photoshop CC 2017 is by subscription ONLY.  If true, you either bought a 1 year pre-paid plan to Creative Cloud or you bought illegal software from an illegal seller. 

 

For what it's worth, I checked that site and they no longer sell Creative Cloud.

Search results: 2 results for "Creative cloud 1 year"

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 06, 2021 Aug 06, 2021

Copy link to clipboard

Copied

Hi Nancy,

 

I saw also on their wehsite than it's a subscription plan today to get Photoshop 2017 CC. I am surprise. I remember than I bought Photoshop CC 2014 (v15) in March 2020 from them. It was a one-time paid version. I thought that it was possible to buy Adobe softwares from reseller. Moreover, I bought other softwares from them in the past always with credit card with no problem. They have good prices and an excellent service.

 

At one point, I got some problems with Ps 2014 CC. Remotely, the technical support service of this website could not fix the problem. So, they updated free to Photoshop CC 2017 (v18). If it was an illegal software, I did not know. I don't want to get in troubles.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 06, 2021 Aug 06, 2021

Copy link to clipboard

Copied

Authorized Resellers can be found on Adobe's website by region.

Adobe Partner Connection Portal

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 06, 2021 Aug 06, 2021

Copy link to clipboard

Copied

Let us be clear :

CS versions were sold with perpetual licenses. The last CS version was CS6

 

CC versions are all subscription only. Be that CC, CC 2014, 2015 .....etc ALL CC versions are subscription only and the subscription gives you access to the current versions. If you are using a "perpetual version" of CC then it is a hacked, pirated copy and as such illegal.

 

Dave

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 19, 2022 May 19, 2022

Copy link to clipboard

Copied

jane-e, couple of minutes ago I was notified of correct answer you marked to the post I'm writing under. I read this answer and see no connection to user request. There is no relation so that must be some mistake? The correct solutions were given already by other attenders of this thread. I can clearly read in original post of method to use batch for user purpose but I do not find information about CS releases and nothing about licenses, so what is is the sense of marking it as correct?

 

Note: the comment you marked belongs to unrelated subthread I myself started over here and let know about in Back Room to look closer into this specific case. Then some participants of that private thread came here and left their extra comments, but that has nothing to do with original request.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 19, 2022 May 19, 2022

Copy link to clipboard

Copied

LATEST

@Kukurykus wrote:

 I read this answer and see no connection to user request. There is no relation so that must be some mistake?


 

Marek, when a user reports they are using a pirated version, we lock the post and then mark the answer that says so as correct. We don't assist folks who do not have legal versions of Photoshop. Thank you for reminding me that I forgot to lock it, and I've done so now.

Jane

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 02, 2021 Aug 02, 2021

Copy link to clipboard

Copied

You can find detailed instructions how to use the scripts, it's simple enough. 

After you save it and add it to the presets folder, you can run it either manually from menu for each image, or record the call of the script into an action and use it in batch processing (built-in batch or image processor)

This version of the script is for the latest versions of Photoshop. After performing the operations, a thin frame is created around the image, which is filled with a content aware fill. In this case, the image practically does not change, but the fields are completely removed:

 

#target photoshop

var lr = new AM('layer'),
    doc = new AM('document');

lr.copyToLayer(2)
lr.motionBlur(90, 2000)
lr.threshold(230)
var layerBounds = lr.descToObject(lr.getProperty('bounds')),
    objectBounds = {};

lr.selectOrdinalChannel()
lr.substractSelection(layerBounds.top, layerBounds.right / 2, layerBounds.bottom, layerBounds.right)
objectBounds.left = doc.hasProperty('selection') ? lr.descToObject(doc.getProperty('selection')).right : layerBounds.left

lr.selectOrdinalChannel()
lr.substractSelection(layerBounds.top, layerBounds.left, layerBounds.bottom, layerBounds.right / 2)
objectBounds.right = doc.hasProperty('selection') ?  lr.descToObject(doc.getProperty('selection')).left : layerBounds.right

lr.deselect()
lr.deleteOrdinalLayer()

lr.motionBlur(0, 2000)
lr.threshold(230)

lr.selectOrdinalChannel()
lr.substractSelection(layerBounds.bottom / 2, layerBounds.left, layerBounds.bottom, layerBounds.right)
objectBounds.top = doc.hasProperty('selection') ? lr.descToObject(doc.getProperty('selection')).bottom : layerBounds.top

lr.selectOrdinalChannel()
lr.substractSelection(layerBounds.top, layerBounds.left, layerBounds.bottom / 2, layerBounds.right)
objectBounds.bottom = doc.hasProperty('selection') ? lr.descToObject(doc.getProperty('selection')).top : layerBounds.bottom

lr.deleteOrdinalLayer()

lr.makeSelection(objectBounds)
lr.crop()

with (objectBounds) {
    lr.substractSelection((bottom - top) * 0.015, (right - left) * 0.015, bottom - top - (bottom - top) * 0.015, (right - left) - (right - left) * 0.015)
}

lr.contentFill()
lr.deselect()

function AM(target, order) {
    var s2t = stringIDToTypeID,
        t2s = typeIDToStringID;

    target = s2t(target)

    this.getProperty = function (property, descMode, id, idxMode) {
        property = s2t(property);
        (r = new ActionReference()).putProperty(s2t('property'), property);
        id != undefined ? (idxMode ? r.putIndex(target, id) : r.putIdentifier(target, id)) :
            r.putEnumerated(target, s2t('ordinal'), order ? s2t(order) : s2t('targetEnum'));
        return descMode ? executeActionGet(r) : getDescValue(executeActionGet(r), property)
    }

    this.hasProperty = function (property, id, idxMode) {
        property = s2t(property);
        (r = new ActionReference()).putProperty(s2t('property'), property);
        id ? (idxMode ? r.putIndex(target, id) : r.putIdentifier(target, id))
            : r.putEnumerated(target, s2t('ordinal'), order ? s2t(order) : s2t('targetEnum'));
        return executeActionGet(r).hasKey(property)
    }

    this.descToObject = function (d) {
        var o = {}
        for (var i = 0; i < d.count; i++) {
            var k = d.getKey(i)
            o[t2s(k)] = getDescValue(d, k)
        }
        return o
    }

    this.copyToLayer = function (copies) {
        var i = copies ? copies : 1
        for (i = 0; i < copies; i++) executeAction(s2t('copyToLayer'), undefined, DialogModes.NO);
    }

    this.motionBlur = function (angle, distance) {
        (d = new ActionDescriptor()).putInteger(s2t('angle'), angle);
        d.putUnitDouble(s2t('distance'), s2t('pixelsUnit'), distance);
        executeAction(s2t('motionBlur'), d, DialogModes.NO);
    }

    this.deselect = function () {
        (r = new ActionReference()).putProperty(s2t('channel'), s2t('selection'));
        (d = new ActionDescriptor()).putReference(s2t('null'), r);
        d.putEnumerated(s2t('to'), s2t('ordinal'), s2t('none'));
        executeAction(s2t('set'), d, DialogModes.NO);
    }

    this.threshold = function (level) {
        (d = new ActionDescriptor()).putInteger(s2t('level'), level);
        executeAction(s2t('thresholdClassEvent'), d, DialogModes.NO);
    }

    this.selectOrdinalChannel = function () {
        (r = new ActionReference()).putProperty(s2t('channel'), s2t('selection'));
        (d = new ActionDescriptor()).putReference(s2t('null'), r);
        (r1 = new ActionReference()).putEnumerated(s2t('channel'), s2t('ordinal'), s2t('targetEnum'));
        d.putReference(s2t('to'), r1);
        executeAction(s2t('set'), d, DialogModes.NO);
    }

    this.substractSelection = function (top, left, bottom, right) {
        (r = new ActionReference()).putProperty(s2t('channel'), s2t('selection'));
        (d = new ActionDescriptor()).putReference(s2t('null'), r);
        (d1 = new ActionDescriptor()).putUnitDouble(s2t('top'), s2t('pixelsUnit'), top);
        d1.putUnitDouble(s2t('left'), s2t('pixelsUnit'), left);
        d1.putUnitDouble(s2t('bottom'), s2t('pixelsUnit'), bottom);
        d1.putUnitDouble(s2t('right'), s2t('pixelsUnit'), right);
        d.putObject(s2t('to'), s2t('rectangle'), d1);
        executeAction(s2t('subtractFrom'), d, DialogModes.NO);
    }

    this.makeSelection = function (bounds) {
        (r = new ActionReference()).putProperty(s2t('channel'), s2t('selection'));
        (d = new ActionDescriptor()).putReference(s2t('null'), r);
        (d1 = new ActionDescriptor()).putUnitDouble(s2t('top'), s2t('pixelsUnit'), bounds.top);
        d1.putUnitDouble(s2t('left'), s2t('pixelsUnit'), bounds.left);
        d1.putUnitDouble(s2t('bottom'), s2t('pixelsUnit'), bounds.bottom);
        d1.putUnitDouble(s2t('right'), s2t('pixelsUnit'), bounds.right);
        d.putObject(s2t('to'), s2t('rectangle'), d1);
        executeAction(s2t('set'), d, DialogModes.NO);
    }

    this.deleteOrdinalLayer = function () {
        (r = new ActionReference()).putEnumerated(s2t('layer'), s2t('ordinal'), s2t('targetEnum'));
        (d = new ActionDescriptor()).putReference(s2t('null'), r);
        executeAction(s2t('delete'), d, DialogModes.NO);
    }

    this.crop = function () {
        try {
            (d = new ActionDescriptor()).putBoolean(s2t('delete'), true);
            executeAction(s2t('crop'), d, DialogModes.NO);
        } catch (e) { }
    }

    this.contentFill = function () {
        (d = new ActionDescriptor()).putEnumerated(s2t('cafSamplingRegion'), s2t('cafSamplingRegion'), s2t('cafSamplingRegionAuto'));
        d.putBoolean(s2t('cafSampleAllLayers'), false);
        d.putEnumerated(s2t('cafColorAdaptationLevel'), s2t('cafColorAdaptationLevel'), s2t('cafColorAdaptationDefault'));
        d.putEnumerated(s2t('cafRotationAmount'), s2t('cafRotationAmount'), s2t('cafRotationAmountNone'));
        d.putBoolean(s2t('cafScale'), false);
        d.putBoolean(s2t('cafMirror'), false);
        d.putEnumerated(s2t('cafOutput'), s2t('cafOutput'), s2t('cafOutputToCurrentLayer'));
        executeAction(s2t('cafWorkspace'), d, DialogModes.NO);
    }
    function getDescValue(d, p) {
        switch (d.getType(p)) {
            case DescValueType.OBJECTTYPE: return (d.getObjectValue(p));
            case DescValueType.LISTTYPE: return d.getList(p);
            case DescValueType.REFERENCETYPE: return d.getReference(p);
            case DescValueType.BOOLEANTYPE: return d.getBoolean(p);
            case DescValueType.STRINGTYPE: return d.getString(p);
            case DescValueType.INTEGERTYPE: return d.getInteger(p);
            case DescValueType.LARGEINTEGERTYPE: return d.getLargeInteger(p);
            case DescValueType.DOUBLETYPE: return d.getDouble(p);
            case DescValueType.ALIASTYPE: return d.getPath(p);
            case DescValueType.CLASSTYPE: return d.getClass(p);
            case DescValueType.UNITDOUBLE: return (d.getUnitDoubleValue(p));
            case DescValueType.ENUMERATEDTYPE: return [t2s(d.getEnumerationType(p)), t2s(d.getEnumerationValue(p))];
            default: break;
        };
    }
}

 

 

* I do not guarantee that the script will handle the rest of the images as easily, so use it with care and do not replace the original files.

1 (1).jpg1.jpgRené dort 2.jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 02, 2021 Aug 02, 2021

Copy link to clipboard

Copied

The script handled greatly another lately attached image. I'm going to unofficially approve it!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 02, 2021 Aug 02, 2021

Copy link to clipboard

Copied

* depending on the uniformity of exposure of the frame around the photo, it may be necessary to adjust the threshold function value. Most likely, there will be problems on large groups of images. 

There is probably a better way to create a mask, but I don't know it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Aug 02, 2021 Aug 02, 2021

Copy link to clipboard

Copied

Who wants, can play with CropAndStraighten.

Faster than motionBlur.

Original images can be tilted.

 

crop(true);
crop();

function crop(select_only)
    {
    try {
        var d = executeAction(stringIDToTypeID("CropPhotos0001"), undefined, DialogModes.NO);
        var l = d.getList(stringIDToTypeID("value"));
        var p = new Array();
        for (var i = 0; i < 8; i+=2) p.push([l.getDouble(i), l.getDouble(i+1)]);

        if (select_only) { activeDocument.selection.select(p); return; }

        var d = new ActionDescriptor();
        var d1 = new ActionDescriptor();
        var d2 = new ActionDescriptor();
        d2.putUnitDouble(stringIDToTypeID("horizontal"), stringIDToTypeID("pixelsUnit"), 0);
        d2.putUnitDouble(stringIDToTypeID("vertical"), stringIDToTypeID("pixelsUnit"),   0);
        d1.putObject(stringIDToTypeID("center"), stringIDToTypeID("point"), d2);

        for (var i = 0; i < 4; i++)
            {
            var d3 = new ActionDescriptor();
            d3.putUnitDouble(stringIDToTypeID("horizontal"), stringIDToTypeID("pixelsUnit"), p[i][0]);
            d3.putUnitDouble(stringIDToTypeID("vertical"), stringIDToTypeID("pixelsUnit"),   p[i][1]);
            d1.putObject(stringIDToTypeID("quadCorner"+i), stringIDToTypeID("offset"), d3);
            }

        d.putObject(stringIDToTypeID("to"), stringIDToTypeID("quadrilateral"), d1);
        executeAction(stringIDToTypeID("perspectiveCrop"), d, DialogModes.NO);

        return true;
        }
    catch (e) { alert(e); throw(e); }
    }

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 02, 2021 Aug 02, 2021

Copy link to clipboard

Copied

Loll about month ago I wanted to ask you how to use 'CropPhotosAuto0001' to avoid duplication of cropped layer to new documents. In the end I used other method, but now I see I should ask. So easy 😉

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines