Copy link to clipboard
Copied
Hi,
If I create a new image with a transparent layer of say 300x300 pixels and put a white square from half to bottom (x: 0, y: 150, width: 300, height: 150) like this:
When I export this by right clicking the layer and choose "Export As... " it automatically crops the transparency and will give it a height of 150:
If I then change the height to 300 the rectangle gets centered :S (really?... Why?... Seems silly!)
Why would I want this behavior? It seems absolutely unwanted and frustrating because I have exactly what i want in the editor but when I export things change. Why would you do this,?, If I want something cropped or centered I will do it myself in the editor, there is no need for making this decision for me!!!
The File->Export->Layers To Files dialog has a Trim Layers checkbox to deal with this. But I want to be able to export a lot of groups (not layers) at the same time, this dialog cannot handle that because it can solely export layers and has no regards for groups (this will export all layers in a group, and not just the resulting frame). I fail to see the logic for putting the Trim optional in the layers dialog - which can't export groups correctly - and not having this option in the normal export - which will export the groups nicely, but as said has no trim options. :S
Is there anyway I can turn of the crop/trim of the export? Or is there a way to avoid it from centering? Basically I just want it to be exported as is! For my real work I need the transparent pixels above the square and not centered.!
Thanks a lot for any help on this!
Somebody on the feedback.photoshop.com has provided a great solution:
You can put a mask on the root item you wish to export to prevent the Trim from happening: This can be a layer:
Or a group:
Then right the layer or group and choose "Export As...".
Copy link to clipboard
Copied
Try using Save As. Or add a 1% opacity pixel in the top left and bottom right canvas corners so transparent borders will not be trimmed. Force Canvas size
Copy link to clipboard
Copied
JJMack​ Thanks for your reply! Save-as will work for this example or a project that needs to be just one frame. But, as mentioned for my real work I have groups that I want to export (each group as its own image), which can not be done with the save-as dialog. It does seem to have a checkbox for layers though.
The 1% opacity pixels - although hackish - will probably work but will introduce artifacts. In my work I resize the canvas to 302 (with my own tools), center the content and then copy the border to the new pixels. This wil end up with having the 1% pixels scaled by 2.(having 4 1% in each corner). This is trick used for 2D OpenGL rendering to hide texture bleeding. I can still try it out but am assuming that the artifacts will be visible in my project. Also my project needs 100% alpha for the code to assume its empty, any value on the alpha channel will generate collisions (because it assumes somethings there). Also putting two of these pixels in every group in every document seems like a choir!
Copy link to clipboard
Copied
What exact version of photoshop are you using?
In photoshop go to Help>System Info and the top line is the Photoshop Version.
I don't see this in the latest photoshop CC 2018 (19.1.4) on macOS.
Copy link to clipboard
Copied
Thanks for you reply!
I'm on Windows 10 x64. Running the latest version of PS:
"Adobe Photoshop Version: 19.1.4 20180507.r.325 2018/05/07: 1170750 x64"
Judging by your screenshot the problem indeed does not occur on your mac! Did you had to resize the canvas height to 300 in the export dialog?
Copy link to clipboard
Copied
From my experience some Photoshop operations will trim Transparent Borders. The resulting layers bounds will be the bounds of the layers pixels there still can be transparency but no full transparent border. The empty borders will not be part of the layer. I believe all Photoshop version Copy/Paste and File Image Place features do. The layers bounds will be for the pixels rendered for the smart object layer pixels. It look like Adobe is continuing this behavior in Export As. Poisoning place in png image that have transparent borders became a problem for for the layer size was not the png files canvas size. So I use the two 1% opacity pixels to not have transparent borders no one will ever see these two pixels unless the pixel peek. A simple Photoshop action can easily add those to pixels.
Copy link to clipboard
Copied
Unfortunately even if the artifacts are non-visible, the environment where my images are going to be used require 100% full alpha to be considered empty. So a pixel of 254/255 alpha will still give me a lot of problems because the environment thinks it's not empty, so although usable for other situations for my situation this will not solve the problem.
The only thing I can think of as a workaround for my situation is to prior to exporting duplicate all groups and then merge al layers from each of the groups to a single layer. Then hide all other layers/groups. Last use File->Export->Layers To Files, uncheck "Trim Layers" and check "Visible Layers Only".
Only real problem with this is it enforces a numeric prefix (again something without a checkbox) to the files based upon the hierarchy of the layers. This means that in a directory listing this hierarchy will have precedence over the names. Which is something to be aware of.
Still i think that the Export layers from the "Layers -> right-click" menu is lacking in design and logic - why not just put a trim-layers checkbox on it - and inconsistent with the file menu (global) version which will only confuse people. One version of the same dialog crops and the other does not, why would you want something like that on your flagship product.!?
After more than a decade struggling with the UI of Gimp I was hoping for a amazing UI. Most of the UI is better then gimp (in my sole opinion), but the dialog's are an enigma to me.
Copy link to clipboard
Copied
AliasMe wrote
Unfortunately even if the artifacts are non-visible, the environment where my images are going to be used require 100% full alpha to be considered empty. So a pixel of 254/255 alpha will still give me a lot of problems because the environment thinks it's not empty, so although usable for other situations for my situation this will not solve the problem.
Photoshop trimming empty borders also seems to be a problem for you. You have to come up with some solution. If you can not handle an Alpha 254/255 that may possible be in the top left, bottom right or both then you need to come up with a way to add back in the empty border to layers. I do not believe Adobe will change their trimming behavior for you. You could request that feature on Adobe's feedback site Photoshop Family Customer Community However, IMO I do not think Adobe would add an option that so few would need to use.
Copy link to clipboard
Copied
JJMack wrote
You have to come up with some solution. If you can not handle an Alpha 254/255 that may possible be in the top left, bottom right or both then you need to come up with a way to add back in the empty border to layers.
Well, as mentioned my workaround is to duplicate all groups I wish to export, then merge all duplicated groups so it results in only one layer per group. Then hide all other layers/groups. Then use File->Export->Layers to Files with "Trim Layers" unchecked and "Visible Layers Only" checked.
JJMack wrote
You could request that feature on Adobe's feedback site Photoshop Family Customer Community However, IMO I do not think Adobe would add an option that so few would need to use.
In this case it should not be about the amount of people requesting it. In the core Photoshop is a graphics editor, and if i make something in it I want it the way I've made it. For me this qualifies a bug or issue and not as a feature because the end product is not what i have designed. And this on a flagship product does disappoint me. I have been a software developer all my life and an issue like this usually gets resolved quick because these kind of products have the unwritten rule: What You See Is What You Get... And we are not getting what we see!
Perhaps I will make a request for that, thanks for the tip!
Copy link to clipboard
Copied
AliasMe wrote
In this case it should not be about the amount of people requesting it. In the core Photoshop is a graphics editor, and if i make something in it I want it the way I've made it. For me this qualifies a bug or issue and not as a feature because the end product is not what i have designed. And this on a flagship product does disappoint me. I have been a software developer all my life and an issue like this usually gets resolved quick because these kind of products have the unwritten rule: What You See Is What You Get... And we are not getting what we see!
Perhaps I will make a request for that, thanks for the tip!
This is not a perfect world and Photoshop has its share of bugs. Historically some of the reported bugs acknowledged as bugs by Adobe have not been fixed the remain in Photoshop release after release. IMO as long as a version of Photoshop is stable and does not crash bugs that effect a small percentage of Photoshop users seem to be acceptable by Adobe mmanagement. Bugs that are in CS2 are still in CC 2018. Bugs introduced in other versions of Photoshop are still in CC 2018. IMO bug should be fixed Adobe does not seem to have the same opinion some bugs seem to be acceptable to Adobe management. I'm sure that Adobe's programmers could fix them.
Copy link to clipboard
Copied
If been using flash/animate since Macromedia Flash 4. And i still see problems with masking in the editor the same way as I saw them back then. So they are not fixed or they are regressions. But in my country we have a saying: "niet geschoten is altijd mis", translate: "if you don't shoot, you will always miss".! And perhaps if we as a community give some more pressure on these topics, then perhaps good things will happen.
So i'm keeping my fingers crossed!
Copy link to clipboard
Copied
Somebody on the feedback.photoshop.com has provided a great solution:
You can put a mask on the root item you wish to export to prevent the Trim from happening: This can be a layer:
Or a group:
Then right the layer or group and choose "Export As...".
Copy link to clipboard
Copied
Good to hear you found a work around that works for you. Thanks for sharing
Copy link to clipboard
Copied
Thanks, you are a champ for providing this solution, works a treat.
Copy link to clipboard
Copied
This no longer works in the latest 22.5.1 Photoshop release.
Copy link to clipboard
Copied
Now there is an option to use legacy Export As in Edit/Preferences/Export at the bottom.
Then this Mask hack will be working again.
Thanks for the tip about it b.t.w.
Copy link to clipboard
Copied
on 24 and up the legacy exporter is crash 9 in 10 times i tried
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Many people need behavior like this. It's as simple as a checkbox; it should absolutely not be the default behavior to change artboard sizes.
Copy link to clipboard
Copied
Also, your image size is 300x300. Mine is 300x150. Perhaps a setting somewhere to always keep the image size? (my installation is fresh and vanilla)
Copy link to clipboard
Copied
Okay, If I use File->Export->Export As i'm now getting the same results as you. If i right click the layer and choose export as I get the trimmed version.!
Although the same dialog, the file menu version seems to be exporting the image (just one frame) and not the layer(s)/group(s). So there is a difference there. Perhaps you can check this on your mac?
Copy link to clipboard
Copied
Yes, it seems there is a difference,
When Export As is done from the Layers panel or Layer menu then the transparency is cropped out versus when using File>Export>Export As the transparency is not cropped out. Anyway those are the results i get here with photoshop 19.14 on macOS.
Copy link to clipboard
Copied
+Jeff, thanks for confirming.!
Copy link to clipboard
Copied
Just do a File>Export>Save for Web - then export it as a GIF or a PNG to keep the transparency and the image with white on bottom and transparency on the top.
Hope that helps!
mark
Copy link to clipboard
Copied
I am having a similar issue. Yes I can do the export / expoprt as dialogue.
But I want to create a timelapse from hand-held camera photographs. I am using Photoshop to align the photos.
Saving / exp[orting each one is time consuming.
If I use File: Generate: Image assets - on the transparency areas are all cropped.
Is there a way to export all layers without Photoshop cropping all transparent areas?