Copy link to clipboard
Copied
Well, I really tried to fix this by myself but I didn`t found any answer to my problem.
I made daily Social Media Posts using Adobe Photoshop as my main software, mostly of the time, I make what we call "carousel posts for instagram"
Well, that said, I never had this problem before, which is:
- I made a new file, with the Instagram Portrait Size, 1080x1350, and then I multiply the
width by the amount of pages of my carousel, so, If I`m making a 10 page, will be 10.800x1350 Pixels file.
Fine, I did my job and finished my project, but here comes the issue, when I slice the image using the guide lines,
it aways made me a total of 10 imagens with 1080x1350 pixels, right?
But not now, when I try to export my project, using cmd + alt + shift + s (export for web) my document simply
started to recize for some values that I didn`t changed.
As example, this project that I`m currently working on, it`s a 10 page carousel, it suposed to be sliced in 10 files
of 1080x1350, but instead, Photoshop is setting the resolution for 819x1024, or 75,85% of the original size
And I tried in different ways to set to 100% but didn`t made it.
Please, does anyone know what is happening here? I didn`t find any tutorial or explanation on internet
And to make it clear, I tried with different files, I tried to creat a new file, it aways happen the same thing.
Thank you for now.
Copy link to clipboard
Copied
The Export > Save for Web (Legacy) is based on old code, which in the 1990's had an upper limit of 8,192 px. Input images larger than this limit will be automatically reduced in px size to fit the limit.
10,800 px is obviously outside of this limit.
If you really wish to use the slice tool, then a script would be required to bypass saving slices via Save for Web.
The following script from @jazz-y will automatically save slices to PSD. You could use a batch action or image processor script to batch convert the PSD files to JPEG. Another option would be to adjust the script code to save JPEG, PNG or WebP etc. directly ā rather than PSD.
This script from @jazz-y will create separate layers from each slice. The layers can then be saved as separate files using various methods (export layers to files script, export as by right-clicking on selected layers in layers panel):
Copy link to clipboard
Copied
WOW thank you!
But I need to ask, I`m really a rookie in therms of coding, how can i use this script?
Thank you so much!
Copy link to clipboard
Copied
All is answered here:
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
Copy link to clipboard
Copied
Thank you for being so supportive!
I followed all steps, but all scripts presents: sintax error during the import to PSD
Copy link to clipboard
Copied
If you let me know what Save for Web settings you wish (PNG, JPEG etc) and compression quality options, I'll change the PSD version to directly export for you in your preferred format.
Copy link to clipboard
Copied
Mostly I save as PNG-24, Bicubic, Optimized, Converted to sRGB
Copy link to clipboard
Copied
Mostly I save as PNG-24, Bicubic, Optimized, Converted to sRGB
By @Guilherme24838758oo0l
Are you sure that the text file isn't RTF, rich text format? It should be plain text only TXT, renamed to JSX. It can't have a double file extension, which can happen if renaming and you have extensions hidden.
Provide a screenshot of the error.
Copy link to clipboard
Copied
OK, the code from @jazz-y is a little hard for me to decipher! :]
I hacked at it for saving as PNG, but it may take a bit more work to get Save for Web in there!
/*
https://community.adobe.com/t5/photoshop-ecosystem-discussions/problem-resizing-during-export/td-p/13654079
https://community.adobe.com/t5/photoshop-ecosystem-discussions/divide-my-image-to-layers/m-p/12467520
https://community.adobe.com/t5/photoshop-ecosystem-discussions/script-for-splitting-multiple-psds-to-defined-slices/m-p/12592481#M608089
*/
#target photoshop
var s2t = stringIDToTypeID,
AR = ActionReference,
AD = ActionDescriptor;
try {
try {
(r = new AR).putProperty(s2t('property'), p = s2t('layerID'));
r.putEnumerated(s2t('layer'), s2t('ordinal'), s2t('targetEnum'));
var id = executeActionGet(r).getInteger(p);
}
catch (e) { throw "No layer selected!\nOpen the document and select layer" }
try {
(r = new AR).putProperty(s2t('property'), p = s2t('slices'));
r.putEnumerated(s2t('document'), s2t('ordinal'), s2t('targetEnum'));
var slices = executeActionGet(r).getObjectValue(p).getList(p);
}
catch (e) { throw "This version of photoshop does not have access to slices" }
(r = new AR).putProperty(s2t('property'), p = s2t('resolution'));
r.putEnumerated(s2t('document'), s2t('ordinal'), s2t('targetEnum'));
var res = executeActionGet(r).getDouble(p);
(r = new AR).putProperty(s2t('property'), p = s2t('title'));
r.putEnumerated(s2t('document'), s2t('ordinal'), s2t('targetEnum'));
var nm = executeActionGet(r).getString(p).replace(/\..+$/, '');
try {
(r = new AR).putProperty(s2t('property'), p = s2t('fileReference'));
r.putEnumerated(s2t('document'), s2t('ordinal'), s2t('targetEnum'));
var pth = executeActionGet(r).getPath(p);
}
catch (e) { throw "File not saved!" }
for (var i = 0; i < slices.count - 1; i++) {
(r = new AR).putIdentifier(s2t('layer'), id);
(d = new AD).putReference(s2t('target'), r);
executeAction(s2t('select'), d, DialogModes.NO);
(r = new AR).putProperty(s2t('channel'), s2t('selection'));
(d = new AD).putReference(s2t('target'), r);
d.putObject(s2t('to'), s2t('rectangle'),
function (b, d) {
for (var i = 0; i < b.count; i++)
d.putUnitDouble(k = (b.getKey(i)), s2t('pixelsUnit'), b.getInteger(k))
return d;
}(slices.getObjectValue(i).getObjectValue(s2t('bounds')), new AD)
);
executeAction(s2t('set'), d, DialogModes.NO);
try {
(d = new AD).putString(s2t("copyHint"), "pixels");
executeAction(s2t("copyEvent"), d, DialogModes.NO);
(d = new AD).putClass(s2t("mode"), s2t("RGBColorMode"));
d.putUnitDouble(s2t("width"), s2t("distanceUnit"), 1 * 72 / res);
d.putUnitDouble(s2t("height"), s2t("distanceUnit"), 1 * 72 / res);
d.putUnitDouble(s2t("resolution"), s2t("densityUnit"), res);
d.putEnumerated(s2t("fill"), s2t("fill"), s2t("white"));
d.putInteger(s2t("depth"), 8);
d.putString(s2t("profile"), "sRGB IEC61966-2.1");
(d1 = new AD).putObject(s2t("new"), s2t("document"), d);
executeAction(s2t("make"), d1, DialogModes.NO);
(d = new AD).putEnumerated(s2t("antiAlias"), s2t("antiAliasType"), s2t("antiAliasNone"));
d.putClass(s2t("as"), s2t("pixel"));
executeAction(s2t("paste"), d, DialogModes.NO);
executeAction(s2t("revealAll"), new AD, DialogModes.NO);
executeAction(s2t("flattenImage"), undefined, DialogModes.NO);
if (activeDocument.mode !== DocumentMode.RGB) {
activeDocument.convertProfile("sRGB IEC61966-2.1", Intent.RELATIVECOLORIMETRIC, true, false);
}
activeDocument.convertProfile("sRGB IEC61966-2.1", Intent.RELATIVECOLORIMETRIC, true, false);
(d = new AD).putObject(s2t("as"), s2t("PNGFormat"), new AD);
d.putPath(s2t("in"), File(pth.path + '/' + nm + ' ' + ('0' + i).slice(-2) + '.png'));
d.putEnumerated(s2t("saveStage"), s2t("saveStageType"), s2t("saveBegin"));
executeAction(s2t("save"), d, DialogModes.NO);
executeAction(s2t("close"), new AD, DialogModes.NO);
(r = new AR).putProperty(s2t('channel'), s2t('selection'));
(d = new AD).putReference(s2t('null'), r);
d.putEnumerated(s2t('to'), s2t('ordinal'), s2t('none'));
executeAction(s2t('set'), d, DialogModes.NO);
}
catch (e) { throw e + "\nScript cannot create layer from empty space!\nMake sure that current layer contains pixels in all slices." }
}
} catch (e) { alert(e) }
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
Copy link to clipboard
Copied
You'd possibly be better using "save as" for this
BUT Steven Marsh is the man when it comes to this complex scripting so lets hope that will make life a lot easier.
I hope this helps
neil barstow, colourmanagement net - adobe forum volunteer - co-author: 'getting colour right'
google me "neil barstow colourmanagement" for lots of free articles on colour management