Bug 333462

Summary: A tool that crops canvas by pixel colour
Product: [Applications] krita Reporter: Achi Brucie <moon_spirit_01>
Component: ToolsAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: halla, hans, info, scottpetrovic
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Other   
Latest Commit: Version Fixed In:

Description Achi Brucie 2014-04-15 12:06:23 UTC
A feature that is available on Photoshop and GIMP. 

Sometimes it is hard to personally crop the image unless you zoom in. A quick feature exists to remove the outside pixels to the colour you've selected.

Look here for an animated gif http://www.creativetechs.com/iq/dont_crop_use_photoshops_trim_feature.html

This saves me time to select, fill, trim rather than trying to manually crop an area.

Traditionally, the options have been transparent, top left or bottom right pixel colour.

Reproducible: Always
Comment 1 David REVOY 2014-04-17 13:36:24 UTC
The current feature "Image > Size Canvas to size of current layer" does it for transparent. 

To try : 
1. Open a canvas
2. Press delete, to clean all the canvas , and get 100% alpha transparency everywhere. 
3. Paint random strokes ( even with airbrush )
4. Image > Size Canvas to size of current layer
- Result : Auto crop to keep only existing pixels

Workaround If you have to trim a solid color around the canvas ( ex: white ) :
- Convert this color to transparent : Use the Filter > "Color > Color to Alpha" prior using "Image > Size Canvas to size of current layer" to do the job. 

... But sure, an easy 'trim' feature dialog doing everything could be easier and less cryptic to find for users.
Comment 2 Scott Petrovic 2015-01-12 01:13:37 UTC
Maybe a wording change might help people identify this feature better: 

"Size Canvas to size of current layer"

to 

"Trim to Current layer"  and also while we are at it change  "Trim to Selection"
Comment 3 David REVOY 2015-01-12 02:53:11 UTC
I agree to shorten with "Trim to Current layer" and "Trim to Selection", Scott. Good idea.
Comment 4 Halla Rempt 2016-01-24 12:38:41 UTC
WISHGROUP: Small Usability Fixes

A workaround: use color to transparency filter, then trim to layer size.